Skip to content

Elastic DSL window-sizing independently reimplements the bug fixed in SQL by #500 #513

Description

@milindsrivastava1997

asap-planner-rs/src/planner/elastic_dsl.rs:79-99 (ElasticSingleQueryProcessor::get_streaming_aggregation_configs) has its own reimplementation of window sizing, independent of sql_utilities::QueryType:

let window = if duration == self.data_ingestion_interval_ms {
    self.data_ingestion_interval_ms
} else {
    t_repeat_ms
};

This is the same shape as the bug #500 fixed in asap-planner-rs/src/planner/sql.rs::compute_sql_window: t_repeat_ms is used uncapped in the else branch, even when it exceeds the query's own duration (a precompute window sized larger than the range it answers).

Per the existing project convention that Elastic planner/engine logic should match SQL's behavior rather than invent independent logic (issue #485), this should get the same fix: enforce t_repeat_ms >= data_ingestion_interval_ms and duration_ms >= t_repeat_ms, then use t_repeat_ms as window_size_ms, returning an error otherwise instead of silently building an oversized window.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions