Skip to content

feat(promql): execute binary arithmetic over warm summary readouts #504

Description

@zzylol

Audit evidence

ASAPQuery PRs #256, #572, #577, and #644 support native PromQL arithmetic over acceleratable leaves. Current backend QueryPlan has no arithmetic/join node, and physical selection rejects rate(a[1m]) + rate(b[1m]) and rate(a[1m]) / 2. Parent matrix: #501. Upstream plan representation is tracked in ProjectASAP/ASAPPlanner#343.

Required behavior

  • Compile Planner arithmetic nodes into QueryPlan operations over warm readouts.
  • Implement + - * / % ^, nested expressions, scalar/vector in both orders, and vector/vector default label-set matching.
  • Preserve top-k labels when a top-k readout is an operand, as fixed by ASAPQuery Make completed summary windows immutable after durable flush #644.
  • Evaluate range requests independently at each step and retain Prometheus NaN/Inf/divide-by-zero behavior.
  • Fall back atomically to the exact Prometheus/archive path when any arm is unsupported or unavailable.

Acceptance tests

Add the PR-derived arithmetic cases to process differential E2E for instant and range endpoints and assert warm provenance only when every arm is warm.

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

    area: control planePlanning, configuration, routing, and control-plane orchestrationarea: data planeRuntime ingestion, storage, and query-serving data pathsarea: physical compilerCompilation from selected logical plans to executable backend and Collector plansarea: query enginePromQL lowering, execution, result shaping, and fallback behaviorarea: summary executionWarm-summary binding, readout, composition, and result decodingenhancementNew feature or requestfeature: PromQLPromQL compatibility and execution semanticsfeature: warm summariesASAP warm-tier materialization, readiness, and servingintegration: ASAPPlannerASAPPlanner API, IR, candidate, and selected-plan integration

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions