Repository navigation
Conversation
zzylol
force-pushed
the
refactor/1207-pass1
branch
from
November 6, 2026 23:55
6686f66 to
d4bde07
Compare
zzylol
changed the base branch from
refactor/1207-memo
to
refactor/1207-lineage
November 7, 2026 00:00
zzylol
force-pushed
the
refactor/1207-pass1
branch
from
November 7, 2026 04:14
d4bde07 to
441f3a9
Compare
zzylol
force-pushed
the
refactor/1207-lineage
branch
from
November 9, 2026 06:16
e2b5456 to
58549f2
Compare
…1207 PR 3) Pass 1 fills Stage 0's memo with each group's initial candidates, every intermediate result its own group and every candidate one operator over input groups: - computation_targets walks memo.groups(): one target per measure of each Aggregate group with a realization besides plain exact execution. - add_pass1_candidates adds every group's own expression, exact accumulators (state group + FinalizeExactAccumulator; avg from sum and count), one SummaryAgg state group per sketch algorithm with one build candidate per configuration of parameter_list(algorithm) and separate SummaryEstimate readout groups, fused builds (whole-expression top-k heaps; nested sum/min/max merges) listing the replaced groups in fused_groups, multi-measure joins, and key-only HAVING pushed below in the consumer Filter group's candidates. - Pass 1 sets no input requirement and no accuracy floor: every candidate's LogicalRequirements are empty; Pass 2 gives each readout its required accuracy (a top-k readout's heap_size >= k included). - ComputationTarget and FusedComputation move into Pass 1 (crate-private), FusedComputation::absorbed_groups replaces target indices, HavingEntry, HavingPlacement and Pass1Error are deleted; pass1_memo returns PerComputationCandidateError. - types: topk::ranked_column_of_group (ranked_column becomes pub(crate)); one unique-key rule for a top-k's ranked rows, exact or a heap readout; any_measure_filtered generic over the predicate's input. - Tests build their memo through the Memo methods; the integration tests stage1_logical_asap_optimization and per_computation_candidates_sql run SQL and PromQL queries through Stage 0 and Pass 1.
zzylol
force-pushed
the
refactor/1207-pass1
branch
from
November 9, 2026 06:37
2c6d993 to
61f585a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Approval. All interface items were approved by the user on 2026-11-07, on condition that existing structures are reused instead of new definitions wherever possible, with no over-abstraction or duplication: B1 plain exact beside the accumulator (decision 9), B2 key-only
HAVINGpushed down per consumerFiltergroup (decision 10), B3 integration helperstodo!until PR 6 (decision 12), B4 the crate-internal top-k fns and the genericany_measure_filtered, B5 the test fixtures, B6 pubtopk::ranked_column_of_group, B7ComputationTarget/FusedComputationprivate to Pass 1, B8FusedComputation::absorbed_groups, B9 noPass1Error. The head 61f585a applies that: see "Simplifications (2026-11-07)", "Deleted" and "Restack onto PR 2b 58549f2 (2026-11-09)".Why
#1207's Order, row "3. Pass 1": Pass 1 adds each group's initial candidates (exact, exact accumulator, summary with one candidate per θ, fused) to the memo, with every intermediate result its own group (#1203: one operator per candidate, no private nodes). It also re-creates the Pass 1 test coverage that PR 0b deleted, with tests that build their input
Memothrough theMemomethods, so no stage crate depends on another, even in tests.PR 0 left Pass 1 stopping at a private stub
logical_node_trees(memo): target discovery walked node trees, and candidates came from a whole-workload node-tree composition (compose_logical_candidate) sized per budget share. Neither has a place in the memo model (concepts doc §3: "Everything that was computed on operator-node trees is computed on groups").What
Target discovery over memo groups.
computation_targets(memo, supported_summaries)readsmemo.groups(): each group'sexpressionandgroup_properties. It finds oneComputationTargetper measure of eachAggregategroup with a realization besides plain exact execution, once however many queries read it. Consumers are the group'sparents. Thelogical_node_treesstub is deleted.Each way to compute a group becomes candidates, through
Memo::find_or_add_groupandMemo::add_candidate(add_pass1_candidates):SummaryAgg[ExactAggregate(kind)](one candidate, no θ) and aFinalizeExactAccumulatorover it.avgfinalizes itssumandcountstates and divides them: a PromQLBinaryOp, or for SQL aJoingroup and aProject;SummaryAgg[Sketch(algorithm)]per supported sketch algorithm, with one build candidate per θ inparameter_list(algorithm), all with the group's own expression (θ only inLogicalProperties::parameters). A separate readout groupSummaryEstimate(state)is read by the result group;sumofsum,minofmin,maxofmax(concepts doc §3, "Fused groups"), one exactSum,MinorMaxbuild over the rows below the inner aggregate, added as a candidate of the outer aggregate's own accumulator state group (Logical memo candidate as (one operator over groups, logical properties θ) with a requirement per input; no private nodes #1203 "fused builds"). One code path serves the three (distributive(intent)gives the accumulator kind). Their builds list the absorbed groups infused_groups;Aggregategroup per measure, each with its own candidates, joined back on the group keys by one candidate of the aggregate's group;HAVING, read from the memo (no recorded copy): the aggregate's ownhaving, split bykey_only_havinginto below/above; and each parent group whose expression isFilter { child: aggregate_group, pred }with a key-onlypred, which gets the candidates that push it below the aggregate (aFiltergroup over the input rows, which the states read; result group = thatFiltergroup). A valueHAVINGstays aFilterabove each readout.Every intermediate result is its own group; each candidate is one operator over input groups. A candidate must output its group's columns (
add_candidaterejects it otherwise), so a readout whose column names differ from the group's (quantileforquantile_0_9) is its own group, read by a renamingProjectcandidate. A heap top-k's Float64 estimate is cast to the exact top-k's column type (a SQL count ranks Int64).No input requirement, no accuracy floor. Every candidate's
input_requirementsareLogicalRequirements::default(), one per input group. Pass 2 (PR 4) gives each readout's input itsrequired_accuracy; a top-k readout'sheap_size ≥ kis part of that rule (concepts doc §2, "One rule for every algorithm"). The heap floor Pass 1 set before (input_requirements,heap_floor) is deleted.A way Pass 1 cannot build is not offered (
Unsupported, e.g. a SQLcount(*)with no non-null column): the group keeps its other candidates. A candidate that breaks the node rules or the group's output is a bug and fails Pass 1 (PerComputationCandidateError::Candidate).pass1_memo(memo, supported_summaries)no longer takes the queries' accuracy targets, the accuracy model, evidence or data. They served onlywithout_summaries_no_query_can_use, which composed whole-workload node trees to prune summaries no query could use; that pruning is query-sensitive (§4: "query-sensitive pruning follows logical generation and reachability analysis") and moves to Pass 2's dead-candidate elimination (PR 4).Schema derivation fix (types, its own commit 246110d). One rule for a top-k's ranked rows, exact or a heap's readout: one row per (partition, item) when the item identity is complete (
ranked_rows_unique_keys,item_identity_is_complete,exact_topk_unique_keysinir/schema/topk.rs). Before, the exact top-k's group derived no unique key over per-series rows while the heap readout'sProjectcarried (job, series identity) fromtopk_schema_of_build, sotopk by (job) (10, sum_over_time(m[1m]))'s heap readout failedadd_candidate's exact check. This PR is the first whose strict check exercises it; PRs 2/2b are not rewritten.Series identity. A readout over per-series rows keeps the
$promql_series_identitycolumn the planner realizes before Stage 0 (with_promql_series_identity), so its renamingProjectoutputs the group's exact (closed) schema. A group whose schema is open (identity not realized) gets no renamed readout: aProjectlists its columns and would drop the unlisted labels.Simplifications (2026-11-07), each removing a definition that duplicated memo data or another function:
HavingEntry,HavingPlacement,ComputationTarget::having_filters(types, + re-export)havingand its parentFiltergroups, read from the memo; privatehas_having(memo, group)for the three "has aHAVING" checksComputationTarget::measure_filter(types)Aggregate.filters[measure_index]; its two uses were already covered bywhole_expression_inputandrealize_keyed_additive_summary_input, which refuse filtered measuresranked_column(memo, group)(a second copy of types'Project/Filter/readout walk)asap_types::ir::schema::topk::ranked_column_of_group(memo, group), types' one walk over its internalMemoGroupAsInput; types' genericranked_columnbecomespub(crate)non_asap(memo, group)(cloned the operator)expression(memo, group), the one accessor besideschema(memo, group)nested_sum_input,add_nested_sum_targetsnested_distributive_input,add_nested_distributive_targetsoverdistributive(intent)exact_accumulator_build,finalized_with, thefinalizedclosureaccumulator_build+accumulator_state(memo, kind, intent, measure, read)SummaryAggComputationTarget,FusedComputationinasap_types::stages(+ re-exports)FusedComputation::absorbed_targets(indices into the target list),AggregateWays::all_targetsabsorbed_groups: Vec<MemoGroupId>, used directly asfused_groups(B8)Pass1Error(one variant)pass1_memoreturnsPerComputationCandidateError(B9); plannerrun_planninguses?, devtoolsrun_stages_untilmaps the error once (its second, unreachable error branch removed)aggregate_group_with,range/instant,table_group,divideaggregate_group(.., having), oneselector(.., kind, ..); the single-use ones inlinedDeleted (replaced by the memo candidates):
compose_logical_candidate,compose,compose_roots,rewrite,substitute,substitute_measure,with_names_of,whole_expression,nested_sum,Sizing,ChosenComputation,Chosen,PerComputationCandidates(withcombinations,absorbed_choice_varies,without_unsupported_summaries,without_summaries_no_query_can_use),output_can_meet_target,sources_read,absorbed_targets,generate_per_computation_candidates,logical_node_trees,ComputationTarget::{choice_count, computation_for},PerComputationCandidateError::InvalidChoice, the Pass 1 featuretest-supportand itstest_supportmodule;asap_accuracy::test_support::{estimate_has_bound, estimate_bound_over_raw_data_samples, local_guarantee}(their only callers were Pass 1's tests, which now live inasap-accuracy); the executor test helpercomputation_candidates(no caller) and the executor's dev-dependencies on Stage 0 and Pass 1.Decisions and pending items
LogicalRequirements { required_accuracy }on readout inputs, set by Pass 2). The top-k heap floor moved out too:heap_size ≥ kis checked in Pass 2's α^log rule.fused_groupsfused_groupslists the groups of the operators it replaces. The whole-expression heap's builds list the absorbed sums' groups; the nested distributive merge's build lists the inner aggregate's group. The doc's rules top-k, sum∘sum, min∘min and max∘max exist (min∘min and max∘max added 2026-11-07 on the sum∘sum path); Hydra is not (doc: "possibly").memo.groups()[id]: expression andgroup_properties.nested_distributive_input,whole_expression_input,reads_only_time_series,measure_input,realize_keyed_additive_summary_input,summed_per_series_samples,ranked_valuetake(&Memo, MemoGroupId).MemoGroupAsInputstays types-internal; the ranked column comes from types'ranked_column_of_group. A privateraw_data_samples_of_metric(memo, group)walks the groups to the metric's scan (accuracy's node version and node-treebind_guaranteesare deleted in PR 4).SummaryCoverage::derive_from_inputsis alreadypub(crate)in PR 2b: no change.add_candidate's output check==), as PR 2 defines it. Qualifiers no longer exist (PR 2b);closedstays compared (see What, "Series identity").pass1_memo(memo, supported_summaries)accuracy_targets,accuracy,evidenceanddata: they served only the whole-workload pruning that PR 4's caps replace.PerComputationCandidateError::{Candidate, LogicalProperties};ComputationTargetover groupsHavingEntryis deleted andComputationTargetis Pass 1-private (2026-11-07, B7).HAVINGpush-downFilter's predicate goes below in theFiltergroup's own candidates, whatever the aggregate's other consumers read (old Pass 1 pushed it only when every consumer applied it, #1089, because a candidate replaced the aggregate for all of them). Read from the memo, no recorded entry.planning::explicit_local_candidates,planning::explicit_summary_candidate,avg_as_sum_and_count)todo!("#1207 PR 6: ..."): realizing a plan from the memo is PR 6's realizer. Interim inside the merge unit.New abstractions not in #1207 or the doc (approved 2026-11-07, B4–B6)
pub(crate)item_identity_is_complete,ranked_rows_unique_keys,exact_topk_unique_keys; privateRankedSource,ranked_source(the walkranked_columnalready did)types/src/ir/schema/topk.rsranked_column_of_group(memo, group);ranked_column<I>frompubtopub(crate)(no caller outside types)types/src/ir/schema/topk.rsMemoGroupAsInput. The pub surface count is unchanged (one pub fn replaces another). B6.any_measure_filtered<C>(was over node predicates)types/src/ir/operator/non_asap.rsexpression(memo, group),schema(memo, group),raw_data_samples_of_metric(memo, group)realization.rsComputationTarget,FusedComputation(moved from types, B7); privatecomputation_targets,add_pass1_candidates,has_having,having_filter_groups,distributive,nested_distributive_input,add_nested_distributive_targets,AggregateWays,SingleMeasure,add_aggregate_candidates,add_fused_candidate,measure_output,accumulator_state,accumulator_build,add_output_candidate,renaming_project,add_group,add_state_group,add_candidate,unless_unsupported,without_unsupported_summaries(free fn)per_computation_candidates.rsAggregateWaysis kept: it is built twice (the aggregate group, each key-onlyFiltergroup, by struct update) and read by two functions; as arguments it would be seven per call.SingleMeasureis kept: five fields read by five functions.metric_schema,scan_operator,group,scan_group,aggregate_group,query(test_fixtures.rs);memo_printout,label,candidates,groups_where,state_group,selector,compare,filter,quantile,sum,topk,pushed_below,candidates_for,algorithms(Pass 1 tests);schema_of(typestopk.rstest);pass1,pass1_over,having_pushed_below(per_computation_candidates_sql.rs);stage0,pass1,root_group,aggregate_groups,candidates_of_aggregates,sketch_builds,avg_candidate_groups,pass1_sql(stage1_logical_asap_optimization.rs)How
computation_targetswalksmemo.groups(). For eachAggregateexpression it lists the ways per measure (computation_candidates_for_intent, unchanged), then detects fused computations over groups (add_whole_expression_targets,add_nested_distributive_targets,close_absorptions; neither applies wherehas_having), prunes a PromQL top-k's own heaps, and drops unsupported algorithms.add_pass1_candidatesadds every Stage 0 group's own expression as a candidate, then, per aggregate group (its ownhavingsplit bykey_only_having) and per Stage 0Filtergroup directly above it with a key-only predicate,add_aggregate_candidatesbuilds each way bottom-up:add_state_group(θ list or one exact build),add_groupfor each intermediate (the operator is also its group's candidate), andadd_output_candidatefor the top operator: added to the result group, or, when its column names differ, added as its own group and read throughrenaming_project.Project; an open group gets none.add_candidate(this crate) →LogicalProperties::new(θ in the list, none on exact operators) → empty input requirements →Memo::add_candidate.Restack onto PR 2b 58549f2 (2026-11-09)
Squashed to one commit on PR 2b's new head (PR 0's 2026-11-08/09 interfaces). Adapted:
SummaryAgg { summary_type: FieldDataType::Sketch(algorithm), .. }; nogrouping, noGroupingStrategycomputation_candidates_for_intent(intent) -> ComputationChoices(noResult); summaries offered whensketch_statistic(intent)isSomeAggIntentmeasures carry no accuracy (N1);PerComputationCandidateError::InvalidAccuracyis gone (PR 0)input_requirementsandheap_floordeleted;add_candidatesetsvec![LogicalRequirements::default(); inputs]heap_size ≥ kincludedLogicalProperties::new(&expression, parameters)(2 args)querybuilds aMemoQuery { root, accuracy_target: None, values_per_evaluation: None }; integration helperstage0(root)callsmemo_of_queries(&[root], &[None], &DataWorkload::default());lower_sql(sql, catalog)FAMILY_PREFERENCE→ALGORITHM_PREFERENCE;familyvariables →algorithm(aSketchAlgorithm) orsummary_type(aFieldDataType); testsa_dropped_readout_drops_the_algorithm,preference_order_names_each_algorithm_once,topk_offers_both_heap_algorithmsFieldDataTypevariant, summary type = family + algorithmasap_input_and_invalid_accuracy_are_rejected→asap_input_is_rejected;aggregate_without_realization_is_not_a_targetusesstddev;only_a_topk_readout_has_a_parameter_floor→pass1_sets_no_input_requirement;summary_candidates_are_unsizeddeleted (no accuracy on intents: nothing to vary)per_computation_candidates_sql.rs:a_sql_fold_over_estimates_leaves_its_row_count_unboundandreads_ddsketchnot restored (PR 0 deletedexplicit_summary_candidate);ColumnRef::Qualifiedarms dropped from the heap-update helperplanning::explicit_local_candidates,explicit_summary_candidate(B3todo!s) are gone: PR 0 deleted them; onlyavg_as_sum_and_countstaystodo!("#1207 PR 6 …")SourceColumn,ColumnLineage,column_lineage(),ColumnIdentity: Pass 1 uses none (it compares output schemas only), so no import changesNo new pub item. Self-review (over-abstraction, duplication, dead code, names):
expression(memo, g)/schema(memo, g)are the only group accessors (no copy elsewhere);raw_data_samples_of_metrichas one Pass 1 copy (accuracy's node copy goes in PR 4); no unused helpers (clippy-D warningsclean).Key code interfaces added / modified
stage1-pass1-per-computation-candidates/src/logical_memo_candidates.rsstage1-pass1-per-computation-candidates/src/per_computation_candidates.rstypes/src/stages/candidates.rstypes/src/ir/schema/topk.rs(schema derivation fix; the one ranked-column walk)types/src/stages/per_computation_logical_memo_candidates.rskeeps onlyHowToComputeAggregateMeasure(devtools reads it).ComputationTargetandFusedComputationmoved, crate-private, tostage1-pass1-per-computation-candidates/src/per_computation_candidates.rs(B7):types/src/ir/operator/non_asap.rs,accuracy/src/test_support.rsUsage (from
running_example_gives_one_build_per_theta_and_separate_readouts, run at this head):Major algorithm changes
Pass 1 candidate generation.
todo!(). Before PR 0, it built one whole-workload node tree per choice and sized each sketch for an equal budget share; the result was copied into private node chains.compose_logical_candidate(choice)→ node tree per choice → sizing peraccuracy_budget_parts→ private chains. After: targets over groups → per way, groups bottom-up throughfind_or_add_group, one build candidate per listed θ, one operator per candidate.add_candidate); the ported frontend tests (stage1_logical_asap_optimization::{sql,promql}_candidates_output_the_query_columns) run every SQL and PromQL query of the old composition test through Pass 1.|parameter_list(algorithm)|(4–280: KLL/DDSketch 7, HLL/KMV 4, CMS/Count Sketch 28, UnivMon 40, heap variants 280) build candidates to one shared state group, instead of one node tree per whole-workload combination.Before / After
The doc's running example (concepts doc §1): query A = p95 of
latency, query B = p99 / p50 of it (running_example_gives_one_build_per_theta_and_separate_readouts). Before (PR 2):pass1_memopanics attodo!("#1207 PR 3: discover targets over the memo groups, not node trees"). After, the memo (printed by the test):Mapping to the doc's table: G1 here is the doc's G1 (
latency, viaScanG0 andTimeRangeG1); G6 = doc G2 (KLL state, one build per θ of KLL's list; the doc'sk = 200/345are illustrative); G8 = doc G2′ (DDSketch); G2/G3/G4 = doc G3/G4/G5, each with its exact aggregate and a renamingProjectover a readout group per algorithm (G7/G9, G10/G11, G12/G13); G5 = doc G6. The doc shows G4/G5 reading only G2′: that is the metric rule, which drops the KLL → ratio edges in PR 4 (decision 2).Verification
cargo check,cargo clippy --workspace --all-targets --all-features -- -D warningsandcargo fmt --all --checkare clean.Pass 1's tests (
stage1-pass1-per-computation-candidates/src/per_computation_candidates_tests.rs, 28 tests; plus 4 inrealization.rs,keyed_heap_input_refuses_a_filtered_countnow over a memo). Each builds its memo throughMemo::find_or_add_groupandMemo::add_query(test_fixtures.rs); no other stage crate is a dependency, even in tests. PR 0b's list (#1229), by category:running_example_gives_one_build_per_theta_and_separate_readoutsper_series_readouts_keep_the_series_identityquantile_over_timereadout'sProjectoutputs the per-series aggregate's exact closed schema, mapping the estimate's$promql_series_identitycolumn onto the group'san_open_per_series_aggregate_offers_no_renamed_readoutmulti_measure_aggregate_has_one_target_per_measureaggregate_without_realization_is_not_a_targetstddev(no accumulator, no summary) is no target and gets no candidate beyond its own expressionan_aggregate_read_by_several_roots_is_one_targetasap_input_is_rejectedunsupported_summaries_are_not_offeredevery_group_offers_its_own_expressionexact_accumulator_is_a_state_group_and_a_finalizemulti_measure_candidate_joins_single_measure_groupspass1_sets_no_input_requirementLogicalRequirementsper input groupkey_only_having_is_pushed_below_into_the_filter_groupFiltergets candidates over filtered input rows; the aggregate keeps its ownvalue_having_stays_aboveglobal_aggregate_having_stays_aboveHAVINGstays aboveown_value_having_filters_each_readouthavingis aFilterover each readoutwhole_expression_topk_heaps_read_the_raw_samplesjob, withRawDataSamplesOfMetric, one build per θ,fused_groups= the absorbed sumscount_ranked_topk_counts_with_unit_weightranked_item_is_the_keys_outside_the_partitionnested_distributive_aggregate_merges_into_the_outer_state_groupsum∘sum,min∘min(new) andmax∘max(new): the merged build is a candidate of the outer aggregate's state group of that kind, over the raw rows,fused_groups= the inner aggregatenested_merge_needs_the_same_distributive_aggregatesumor aminover amaxgets no mergeupdate_weights_follow_the_measurecardinality_keeps_…,frequency_statistics_keep_universal_choices,topk_keeps_both_specialized_heap_choices,approximate_count_lists_its_accumulator_and_summaries,a_count_offers_no_count_sketchSchema derivation fix (
types/src/ir/schema/topk.rs):exact_topk_and_heap_readout_derive_the_same_unique_keys— fortopk by (job) (10, sum_over_time(m[1m]))over realized series identity, the exact top-k's group and a heap's ranked readout derive the same non-empty unique key.Guarantee composition is no longer Pass 1's: candidates carry θ, and each build's ε follows from θ (PR 1's
parameter_list); composition to the query root iserror_propagation(PR 4) and constraint (K) (PR 8). The Count-Min bound test that lived in Pass 1 but testsasap-accuracy(count_min_estimate_has_no_bound_over_an_open_requirement) moved toaccuracy/src/propagation.rs; its sibling…_is_gated_on_the_metricwas deleted by PR 0 (itslocal_guaranteeis gone).Ported to the memo (
integration-tests):per_computation_candidates_sql.rs(the fourHAVINGtests, the three heap-update tests, over Pass 1's memo of SQL queries) andstage1_logical_asap_optimization.rs(itspromql()helper realizes series identity, as the planner does):sql_candidates_output_the_query_columnsandpromql_candidates_output_the_query_columns(were*_candidates_compose: every query of the old composition test goes through Pass 1 with every candidate's output checked byadd_candidate),topk_offers_both_heap_algorithms(wastopk_estimates_carry_no_frequency_bound; the guarantee half moves to PR 8),topk_over_an_aggregate_ranks_its_labels,subquery_in_a_measure_filter_is_an_input_group_of_the_state(was…_is_substituted),filtered_sql_avg_is_null_without_matching_rows,promql_avg_divides_sum_and_count_vectors,sql_avg_keeps_its_explicit_output_name,sql_count_star_without_a_non_null_column_is_only_exact(was…_is_unsupported),sql_count_of_a_nullable_column_counts_its_values.Deleted:
devtools/src/candidate_labels.rsconnected_labels_describe_selected_statesandconnected_labels_name_actual_shared_state(they labelled composed node trees; tools are PR 9; PR 0 already deletes them on the new base). PR 0 deletedstage1_logical_asap_optimization.rs(P11: composition tests); this PR adds back its memo-based version and registers it intests/main.rs.Test status
cargo test -p <crate> --all-features --no-fail-fast, per crate, at 61f585a (logs: per-crate, compared by test name with PR 2b 58549f2). No test fails inside Pass 1; planning stops at Pass 2's firsttodo!()(PR 4: "rule 1, chain groups and the merges over them").exact_topk_and_heap_readout_derive_the_same_unique_keys)asap_plannersubprocessesavg_as_sum_and_count, new tests); 1 as on PR 2b (materialized_views)By test name against PR 2b: no test that passes on PR 2b fails here. 46 newly passing: 4 SQL
HAVINGtests (failed at PR 3'stodo!on 2b) and 42 tests absent on 2b (24 Pass 1, 13stage1_logical_asap_optimization, 3 SQL heap-update, 1 types, 1 accuracy; renamed and moved ones included). Three new tests fail at an interimtodo!("#1207 PR 6: realize the sum-and-count plan ofavgfrom Pass 1's memo")(B3):sql_avg_counts_its_own_input,sql_avg_from_sum_and_count_executes_as_avg,sql_avg_of_an_int64_column_keeps_the_exact_columns(absent on 2b). Six 2b tests are gone by name: renamed (a_dropped_readout_drops_the_family,preference_order_names_each_family_once), moved (count_min_estimate_has_no_bound_over_an_open_requirement→ accuracy;a_count_offers_no_count_sketch,approximate_count_keeps_one_exact_accumulator_and_universal_choices→ Pass 1's test module, the latter asapproximate_count_lists_its_accumulator_and_summaries), deleted (summary_candidates_are_unsized).crate_graph(inasap-integration-tests) passes.cargo fmt --all --checkandcargo clippy --workspace --all-features --all-targets -- -D warningsare clean.Done means
backup/1207-pass1-2c6d99336).HavingEntry,HavingPlacement,having_filters,measure_filter,nested_sum,non_asap(memo,ColumnIdentity,Pass1Error,absorbed_targets,all_targets,ComputationTarget/FusedComputationin types,reader,kept, MILProw,σ/Schedule,EvaluationSchedule,logical_node,child_groups,accuracy_budget_parts,operators_kept_in_definition,group_as_input,BuiltOrInput,qualifier): no hit in the code; in the body only the names of deleted items (logical_node_trees,accuracy_budget_parts,HavingEntry,HavingPlacement,having_filters,measure_filter,nested_sum*,non_asap,Pass1Error,absorbed_targets,all_targets,qualifierin PR 2b's summary) and SQL/PromQL data rows (row/rows).refactor/1207-lineage58549f2).