Skip to content

feat(query-engine): RQE tree query route #883

Closed

Description

@milindsrivastava1997

Part of the RQE frontend tracker. Decisions live in the tracker. Stacked on A3.

What

Query engine (asap-query-engine):

  1. engines/simple_engine/rqe.rs: evaluate an RQE tree at a time t:
    • leaf: look up rqe_configs[id] → AggregationIdInfo; timestamps = aligned end (same alignment as PromQL) minus lookback_ms; QueryMetadata from capability/phi/k/grouping; then the existing context tail (build_sql_execution_context_tail-style) and execute_context; apply the config's roll-up if any
    • agg: regroup the child's results by by with avg/min/max/sum
    • binary: combine_vector_vector / combine_scalar
  2. Route POST /api/v1/rqe_query with body {"expr": <tree>, "time": <unix secs>}, answering Prometheus vector JSON. Output labels must equal what Prometheus returns for the equivalent PromQL (including __name__ handling), because fidelity scoring matches series by exact label set.
  3. No fallback to another backend. No data yet → empty result. Unknown RQE id or invalid tree → HTTP 400.

Done when

  • tests per node kind; error/empty cases; a leaf answers the same as the PromQL path for the same plan/config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions