Skip to content

QueryWorkload streaming fields (RepeatingEntry, DataCharacteristics) are unused — should be wired in #194

Description

@milindsrivastava1997

Summary

crates/ir/src/workload.rs defines QueryWorkload.repeating_queries: Option<Vec<RepeatingEntry>> and .data_characteristics: Option<DataCharacteristics> (backed by RepeatingEntry, DataCharacteristics, DataDistribution, RepetitionInterval) for streaming/repeating workloads and sketch-sizing inputs.

Neither field has a producer or a consumer anywhere in the workspace:

  • No frontend or batch-lowering path ever populates repeating_querieslower_promql_batch/lower_sql_batch only read query_batch.
  • data_characteristics's own doc comment claims it's "used by the cost model and sketch-parameter binder to size sketches" — plan::cost_model::CostModel::rank_candidates/size_params take no such input; there is no live call site anywhere.
  • The only place either field is even referenced is one PromQL test file, which always sets both to None.

Ask

Either wire these into a real streaming-workload path and the cost model's sizing logic (per the doc comment's stated intent), or, if streaming support isn't near-term, consider removing them until there's a concrete consumer — following the same empirical-verification pattern as #181/#182 for QueryExpr::Ref/LetBinding/Window.

Activity

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

    cost-modelCost formulas, statistics, ranking, and selectionenhancementNew feature or requestworkloadBatch, repeating, or multi-query workload modeling

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions