Repository navigation
chore!: accumulated review nits (column-metric and viewer fixes, timing names, lost tests, stale comments) - #737
Merged
Merged
Conversation
…ayout column_metric assumed group keys first and measures last. A per-entity reduction (count_over_time) keeps every label and replaces the sample value in place, so its value column got the absolute metric and a label after it got the count's. Read the layout aggregate_output_schema produces: the per-entity measure at its input column, and a cross-series count_values label before its count.
…scalar_roots - stageScalarText printed "0" for an Arithmetic operator: ArithmeticOpKind serializes as a string, whose first key is its first index. - validateStagePipeline treated a scalar_roots that is not an array as empty instead of reporting it. - test_server: the skip for a missing stage_pipeline decorates the endpoint test class again, not the post_plan helper.
…iming - ExecutionDataStateError::EvaluationUnderMaintenance is now QueryTimeValueUnderIngestionSummary and InvalidMaintenanceBinary is InvalidIngestionTimeBinary (now documented); their messages say ingestion time. - split_shared_by_phase is now split_shared_by_timing: it splits by execution timing, not evaluation phase. - MaterializationAssignment's Debug prints each assigned node's kind and address, not its whole sub-DAG. - The edge-rule table states that a query-time MaintainPopulation does not read a MatAtIngestion input's stored output. - Tests: an ingestion-fixed node rejects MatAtQuery, an explicit NotMaterialized keeps a fixed timing, and a fixed-timing conflict survives the split.
…e the front's latencies once
- devtools PATTERN_A is an array of PatternAQuery { promql, window_ms,
offset_before_t_ms } instead of unnamed tuples.
- candidate_labels: same() only forwarded to same_computation.
- Stage 3's Pareto front computes each candidate's worst latency once
instead of once per pairwise comparison (dominates_at).
- Pass 2 test locals named for the old records (groups, variants,
sites) are renamed to the *Candidate vocabulary.
- Port three tests lost when the legacy IR was removed: filtered and unfiltered aggregates do not merge, without() drops a renamed sample column, and series identity accepts a direct vector literal. - Pass 1 HAVING: a scalar-reference consumer keeps a key-only HAVING above the output; of stacked Filters only the adjacent one is HAVING. - Materialization: the population test asserts something is stored, and a mixed-placement DAG (one summary stored, one rebuilt) answers alike. - Tumbling panes: the sample set is a parameter instead of a thread-local; new tests for an empty middle pane, counters over panes with an outer offset, and gap/overlap rejection. - Executor: factory and DAG heap states merge interchangeably. - Stage 3: a shared summary takes the smallest failure-probability share; a declared counter prices the CMS+heap candidate per node. - execution_timed_dag: an empty workload is NoRoots, a literal-only one a DAG with no nodes; exact-state roots and their state run at query time.
Read-out wording becomes evaluation; AbsoluteValue/RelativeValue become absolute/relative errors; the HLL merge's idempotence is stated next to KMV's (and the stale missing-KMV-kernel note dropped); the misplaced compile_node doc moves back above it; compile_exact_evaluation states its offset-0 counter window; Example 1's 27 is 3 x 9; parsed_workload names the query-language frontends and Stage 1; the factory updater's DAG-state claim is limited to the heap families; a SQL fold test no longer claims its target is unmet; "dag" becomes "DAG".
zzylol
force-pushed
the
chore/accumulated-review-nits
branch
from
October 16, 2026 19:07
6f2291c to
e8b84af
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.
Why
The clean reviews of the merged stack and the later PRs (#542 … #724) left a list of nits for one follow-up PR. Many were fixed since. This PR checks every item against current main, fixes the ones still open that no in-flight PR owns, and records the status of every item in the table below.
What
Grouped by area. Behaviour is unchanged except for the three bug fixes, and each of those has a test that fails without the fix.
Bug fixes
types:column_metricassumed an aggregate's group keys come first and its measures last. A per-entity reduction (count_over_time) keeps every label and replaces the sample value in place, so its value column got the absolute metric and a label after it got the count's.stageScalarTextprinted(time() 0 2)for anArithmeticnode, becauseArithmeticOpKindserializes as a string ("Add"), whose first key is"0".validateStagePipelinetreated ascalar_rootsthat is not an array as empty instead of reporting it.Materialization timing (
ir::timing,ExecutionDataStateError)EvaluationUnderMaintenance→QueryTimeValueUnderIngestionSummary,InvalidMaintenanceBinary→InvalidIngestionTimeBinary(now documented),split_shared_by_phase→split_shared_by_timing.MaterializationAssignment'sDebugprints each assigned node's kind and address, not its whole sub-DAG.MaintainPopulationdoes not read aMatAtIngestioninput's stored output.MatAtQuery; an explicitNotMaterializedkeeps a fixed timing; a fixed-timing conflict survives the split.Missing tests
without()over a renamed sample column, and series identity overvector(1).Filter(scan, EXISTS G)) keeps a key-only HAVING above the output; with stackedFilters, only the adjacent one counts as HAVING.offset, and gaps and overlaps between panes.execution_timed_dag: an empty workload givesNoRoots, and a literal-only workload gives a DAG with no nodes. Exact-state roots and their state run at query time.Small cleanups
PATTERN_Ais an array ofPatternAQuery(named fields) instead of unnamed tuples.same()from devtoolscandidate_labels.groups,variants,sites) now use the*Candidatevocabulary.Stale comments
AbsoluteValue/RelativeValue→ absolute/relative error.compile_nodedoc is back oncompile_node.compile_exact_evaluationnow says its counter window has offset 0.parsed_workloadnow names the query-language frontends and Stage 1.How
column_metricasks a newaggregate_measure_atwhich measure an output column holds. It follows the layoutaggregate_output_schemabuilds: a per-entity measure sits at its input column; a cross-series measure follows the kept labels, and acount_valueslabel comes before its count unless an earlier column already has that name.dominates_atwith latencies computed once per candidate.dominateskeeps its behaviour by calling it.Key code interfaces added / modified
crates/types/src/post_asap/execution_data_state.rscrates/types/src/ir/timing.rscrates/devtools/src/planner_layering_examples.rscrates/types/src/types.rs(private)crates/asap-aware-mapping/src/stage3_plan_selection.rs(private)Before this PR
count_over_time(m[5m])(output[ts, value, job]):column_metricgave column 1 (the count) the absolute metric and column 2 (job) the L1-scaled count metric.(time() 0 2)fortime() + 2and silently accepted"scalar_roots": {"0": …}.split_shared_by_phasesaid "phase", where both mean timing.After this PR
job.(time() Add 2)and reports "scalar_roots must be an array".Item status
same_referencein pass/major.rs should useir::cse::same_nodepass/major.rswas deleted withMajorPass(#674); nosame_referencehelper remainsFILTERclause")execution_timed_dagexecution_timed_dagtestsexecution_timed_dag_of_an_empty_and_a_literal_only_workload; timing asserts inexact_state_roots_are_finalizedexecution_timed_dag)ir::cse::tests::filtered_and_unfiltered_aggregates_do_not_mergeir::aggregate_schema::tests::without_aggregate_drops_a_renamed_sample_valueir::schema_support::tests::series_identity_accepts_direct_vector_literalir::timingedge-rule table (behaviour unchanged)mixed_placement_answers_like_query_timefixed_window_rate_candidatesneeds MatAtIngestionreplacement.rs)split_shared_by_timingdocasap-typesones (see the audit rows);OperationPlacement::Maintenanceandrecurrence.rsbelong to the legacy-core deletionDebug: kind and address per nodea_scalar_reference_consumer_keeps_a_key_only_having_aboveonly_the_adjacent_of_stacked_filters_is_havingingestion_fixed_node_rejects_mat_at_queryexplicit_not_materialized_keeps_a_fixed_timinga_fixed_timing_conflict_survives_the_splitlib.rs/cost_model.rsbelong to the legacy-core deletion, #573 lines to the docs PRQueryTimeValueUnderIngestionSummary,InvalidIngestionTimeBinarycost_model.rs)split_shared_by_timingAccuracyModel; callers inreplacement.rs)lib.rsdocs)stageScalarTextArithmetic op label reads "0"max_distinct_per_evaluationdoc: longest windowestimatorin construct_summary_aggreplacement.rs)require_sound_mergedocexact_increase_over_an_empty_middle_pane_matches_single_buildpane_chain::shifted): a range reads through at most oneHydraCmsGroup::approx_memory_bytesexcludes the gridvalidate_hydra_cmsrejects Constant(2.0)Constant(1.0)scalar_rootsshould be an errorfactory_and_dag_heap_states_are_interchangeableupdate_keyed.expecton overflow(); returning the error is a trait change (the DAG build already returns it)for_quantilegone; L2 isRelative)dominatesignores the metricreconciliation.rs).ok()?resize already succeeded inselect_plan)replacement.rs)a_shared_summary_takes_the_smallest_failure_probability_share; CountSketch was already covered (#712)SummaryMergecoverage refuses panes read through@, and Pass 2 offers nonea_counter_over_panes_with_an_outer_offset_matches_single_build,counter_panes_with_a_gap_or_an_overlap_are_rejectedreplacement.rs)Selection.accepteddocSelectionError::EntryCountan_entry_count_mismatch_is_an_error)a_declared_counter_prices_the_count_min_heap_candidateaccepted→Vec<AcceptedAccuracy>accuracy_targets()computed twiceQueryWorkloadEntry: Defaultonly for testsphysical_candidate_countre-implements every operatorreplacement.rs)PATTERN_Ais named here;accuracy_targetwaits for the legacy-core deletion (legacy callers); the serialized and CLI names go in a follow-up PR, after the legacy-core deletionmerged_errorinfers "has heaps" from any Approximate entrysame()pass-through wrappervariants/groups/sitesame_computationunmemoizedunion()sort-and-sweepingest_workersO(n·e) per stateprice())worst_latency_msdominates_atraw_datakeyed by Debug stringprice())Counts: 41 fixed here, 18 already fixed, 26 owned by another PR or issue, 7 not applicable, 2 open and tracked in issues, 1 follow-up PR (row 96 is partly fixed here, with its other renames in the same follow-up PR), 11 left open.
Verification
Only the tests covering the changes were run, on the head after rebasing onto main (
ac8493a2, #734):cargo nextest run -p asap-types: 273 passed.-p asap-aware-mapping: theasap_aware_cse,stage2_physical_asap_optimizationandaccuracy::compositionmodules, the new pass and Stage 3 tests, the cluster-objective tests and--test per_computation_candidates: all passed.-p asap-physical-operators --test deployment: 10 passed.-p asap-planner --test summary_sharing: 9 passed, 3 ignored. When run, the three ignored tests still fail (Pass 2 sharing and Stage 1 coverage parity with the retired MajorPass #580).-p asap-integration-tests:materialization_e2e,tumbling_pane_merge, the Pattern A tests ofplanner_layering_example3, andplanner_layering_example4'smaterialized_output_covers_its_consumersandpareto_front: all passed.-p asap-devtools --test stage_pipeline -E 'test(display_cap)': passed.python3 -m unittest test_viewer test_serverin tools/dag-viewer: passed.cargo fmt --all -- --checkandcargo check --testson the touched crates: clean, no warnings.a_per_entity_count_states_its_value_column_not_its_last_column,ScalarTextTests, and the "scalar roots not an array" case) were seen to fail before their fixes.Screenshots: not applicable. No measurements: the front change is a constant-factor saving with the same result.
Limitations and follow-ups