Audit evidence
ASAPQuery PRs #256, #572, #577, and #644 accelerate arithmetic trees over supported PromQL leaves. ASAPPlanner lowers the syntax, but current physical selection returns no legal summary candidate for both rate(a[1m]) + rate(b[1m]) and rate(a[1m]) / 2. The binary root therefore hides otherwise-realizable leaves.
Required behavior
- Add a post-ASAP representation for exact arithmetic over independently realized summary/readout children.
- Cover all six ASAPQuery operators:
+ - * / % ^.
- Preserve vector/vector label matching for the ASAPQuery-supported default case and both scalar operand orderings.
- Keep whole-query exact fallback when either arm cannot be accelerated; do not partially answer from mismatched snapshots.
- Keep vector-matching modifiers out of scope, matching ASAPQuery.
Acceptance tests
Planner E2E/candidate tests cover instant/range-shaped workloads, nested arithmetic, vector/vector, scalar/vector, vector/scalar, empty arms, and an unsupported-arm fallback. Link backend execution work to ProjectASAP/ASAPQuery-backend#501.
Audit evidence
ASAPQuery PRs #256, #572, #577, and #644 accelerate arithmetic trees over supported PromQL leaves. ASAPPlanner lowers the syntax, but current physical selection returns no legal summary candidate for both
rate(a[1m]) + rate(b[1m])andrate(a[1m]) / 2. The binary root therefore hides otherwise-realizable leaves.Required behavior
+ - * / % ^.Acceptance tests
Planner E2E/candidate tests cover instant/range-shaped workloads, nested arithmetic, vector/vector, scalar/vector, vector/scalar, empty arms, and an unsupported-arm fallback. Link backend execution work to ProjectASAP/ASAPQuery-backend#501.