Skip to content

Pass 2: sliding-window and Exponential Histogram composition — after #511 #522

Open

Description

@zzylol

Goal

The rest of #509's window-composition rule, after tumbling windows (#518):

  • Sliding window: one summary per active window, with each sample inserted into every active window. Works for non-mergeable summaries; costs more ingestion work and memory.
  • Exponential Histogram: EH buckets that grow with age cover a long history. A query window merges the buckets it covers, with approximate boundaries for old windows. Example 3 Pattern A and Example 4 Pattern A in docs: propose workload-wide planning, summary sharing, and materialization #509.

Blocked on

Implementation of #511 (unified operator graph: OperatorNode with common metadata, no KeepPreAsap wrappers). Do not start before #511 is implemented.
Also depends on #518 (tumbling), and on two #509 TODOs: the design of summary subtract/delete nodes, and query-time materialization in physical planning.

Current state

  • SummaryWindowFramework { Tumbling, Sliding, ExponentialHistogram } exists (types/src/post_asap/summary_window.rs).
  • EH accuracy evidence exists in summary_maintenance_cost/window.rs.
  • The framework is chosen only from provider evidence registered in tests, so it is always None in production.

To decide

Activity

  1. zzylol commented on Oct 15, 2026

    @zzylol
    ContributorAuthor

    Status: planned with the window-grid work. It comes after the tumbling-pane Pass 2 rule (#518, in progress) and Stage 2 materialization (materialization enumeration and MatAtQuery).

    These acceptance tests are #[ignore]d on main for sliding windows or EH:

    crates/integration-tests/tests/planner_layering_example3.rs

    • Pattern A, EH across queries: stage1_logical_asap_optimization_a_window_composition_adds_one_eh_for_all_five, …_a_keeps_independent_and_shared_window_summaries, …_a_window_composition_groups_every_pair
    • Pattern B, tumbling and sliding: stage1_logical_asap_optimization_b_window_composition_adds_sliding_and_tumbling_per_option, …_b_merge_only_where_the_window_form_needs_it

    crates/integration-tests/tests/planner_layering_example4.rs

    • Pattern A, shared EH and its materialization: stage2_physical_asap_optimization_a_shared_eh_has_three_materialization_options, …_a_at_rest_drops_the_ingestion_time_option, …_a_materialized_eh_is_built_once_for_all_consumers, stage3_plan_selection_a_rebuilding_per_query_costs_more_than_building_once, …_a_once_adhoc_prefers_the_query_time_eh, …_a_monthly_amortizes_ingestion_time_maintenance
    • Pattern B, sliding: stage2_physical_asap_optimization_b_sliding_kll_has_two_materialization_options

    The other Example 4 Pattern B tests (tumbling KLL, b1/b3, stage3_plan_selection_b_*) are ignored only for tumbling windows and materialization. They belong to #518 and the Stage 2 materialization work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions