Skip to content

[Feature] DataFusion engine E5b: OnFirstRead saves, the all-OnFirstRead test switch, query-time window chains #1515

Backlog

Description

@milindsrivastava1997

Example

A view marked OnFirstRead with 1-minute windows: the first batch at T=10:05 computes windows up to 10:05, saves those ending at or before the watermark, and a second batch reads them back without touching raw data.

User need and MVP

Views the query engine builds, and whole-plan tests without the precompute engine. Simplest correct version only; no performance work (design doc, Principle).

Authoritative design

D9, D12 item 2, D13 SummaryTumblingWindowChain row.

Agent orchestration: orchestration plan.

Inputs, outputs, and invariants

  • Only windows ending at or before the watermark passed in with the batch are saved; newer ones live only in the scratch store.
  • First save wins.
  • Window end is date_bin(w, t − 1 ms, 0) + w (windows are (k·w, (k+1)·w]).
  • A test-only switch treats every AtIngestion view as OnFirstRead.
  • Eviction is not this crate's job.

Before and after behavior

Before: OnFirstRead views and query-time chains refused. After: any corpus plan runs in cargo test from raw data alone.

Unit and end-to-end acceptance tests

  • An unfinished window is not saved and is recomputed next batch.
  • Two concurrent saves of one window: one stored, answers equal.
  • With the switch on, sketch plans' answers are within the plan's guarantee of the exact plan's (D12 item 3).

Explicit non-goals

Making a concurrent batch wait for the first save, retention (ASAPQuery wrapper).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementtestingwindow

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions