Skip to content

promql.rs: instant vs range query paths duplicated #507

Description

@milindsrivastava1997

Instant and range query handling in promql.rs are hand-cloned rather than shared:

  • handle_binary_expr_promql (line 381) vs handle_binary_expr_range_promql (line 535): identical scalar-vs-vector arm detection.
  • build_arm_logical_plan (line 346) vs build_arm_range_context (line 462): identical recursive Paren-unwrap + structural config lookup.
  • handle_query_promql / handle_range_query_promql both re-parse the query string just to check for a binary expression, and the context builders they call parse the same string again — the AST gets parsed 2-3x per query.

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