fix(core): a Summary can be built from an engine's parts, and keys stop cloning values (improvise-qddo)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VdfEGXA7aJ6ftMsCc9PJze
This commit is contained in:
committed by
Edward Langley
parent
511911db38
commit
4a49398f1a
@@ -70,3 +70,9 @@ implementation, written as a query engine with no index would answer, sharing on
|
||||
`DataStore`. `the_store_and_a_scanned_table_answer_every_select_alike` asks both every select over a
|
||||
fixture (every subset of every stored key as a base, with no span, one span of each of six item
|
||||
lists, and two), at both widths and for all five functions: over 5,000 triples.
|
||||
|
||||
## Building a `Summary` from an engine's answer
|
||||
|
||||
`Summary::from_parts(Numbers::from_parts(count, exact_sum, least, greatest), Agreement)`. `Agreement`
|
||||
is what the non-number values hold: `None`, `One(v)` or `Mixed`. `from_parts` drops extremes that
|
||||
contradict the count or are NaN, so a source cannot hand the evaluator a state `add` could not reach.
|
||||
|
||||
@@ -2344,3 +2344,20 @@ the member records of an aggregate over an expression
|
||||
A select with `exact` and no span is the cell, not the cells containing the pairs. The store's
|
||||
`spanned_values` is never called for it (the evaluator reads an exact key through `value_at`), so
|
||||
this is the contract a second source implements. Rival: `exact` ignored when there is no span.
|
||||
|
||||
### a_summary_built_from_an_engines_parts_reduces_as_one_built_from_the_values
|
||||
|
||||
Review of #356 (Codex): an engine outside core could not build a `Summary` without replaying rows. The
|
||||
parts (count, exact sum, extremes, agreement of the non-numbers) are computed in the test without
|
||||
`Summary::of`, for the 585 sequences of the reference test. Rivals: the greatest taken from the least;
|
||||
a NaN allowed as an extreme. Each fails it.
|
||||
|
||||
### parts_that_contradict_themselves_are_made_consistent
|
||||
|
||||
Extremes with no numbers, and a NaN as an extreme, are dropped by `Numbers::from_parts`.
|
||||
|
||||
### keys_of_a_store_are_its_cells_keys_without_the_values
|
||||
|
||||
Review of #356 (Codex): `DataStore::keys` went through `cells` and cloned every value. It reads keys
|
||||
only now; the test pins the keys and their order against `cells`. No clone-count test: a value clone is
|
||||
not observable from outside, so the equality is all that can be asserted.
|
||||
|
||||
Reference in New Issue
Block a user