Skip to content

feat(asapquery-profile): cover the complete ASAPQuery PromQL acceleration matrix #501

Open

Description

@zzylol

Summary

Raise the backend-local asapquery profile from its four-case MVP matrix to the complete accelerated PromQL surface documented and tested by current ASAPQuery.

Current gap

The backend profile's executable matrix currently proves only rate, increase, sum_over_time, and quantile_over_time for instant/range queries. ASAPQuery additionally accelerates:

  • temporal count_over_time, avg_over_time, min_over_time, max_over_time;
  • spatial sum, count, avg, min, max, quantile, and topk, with optional by(...);
  • the six safe temporal/spatial compositions currently recognized by ASAPQuery: sum(sum_over_time), sum(count_over_time), min(min_over_time), max(max_over_time), topk(sum_over_time), and topk(count_over_time);
  • arithmetic trees over acceleratable leaves using + - * / ^ %, including scalar/vector arms;
  • both instant and range evaluation, including sliding-window composition and a query lookback wider than the materialized pane/window.

ASAPQuery's README intentionally excludes label selectors from this accelerated profile, and vector-matching modifiers are explicitly out of scope in its arithmetic design; those are not requested here.

Scope

  • Add every listed shape to backend-local planning, physical compilation, precompute, QueryPlan execution, and readiness coverage.
  • Preserve Prometheus labels, timestamps, range steps, counter reset/extrapolation semantics, Top-K ordering/labels, and arithmetic behavior.
  • Use the canonical ASAPPlanner IR and selected summary plan; do not restore the historical ASAPQuery planner.
  • Fail closed to exact Prometheus fallback whenever any leaf/operator cannot be accelerated safely.
  • Version and document the expanded compatibility level.

Acceptance criteria

Activity

  1. zzylol commented on Sep 4, 2026

    @zzylol
    ContributorAuthor

    ASAPQuery PromQL PR audit → executable matrix

    Audited all ASAPQuery PRs and excluded SQL/Elasticsearch. The matrix is grouped by behavior rather than duplicating every literal metric name.

    Warm rows already proved by the backend process E2E

    Rows that compile but still need process-level parity promotion

    These remain in this umbrella until they are added to the canonical startup snapshot and asserted warm against Prometheus.

    Executed fallback rows and owners

    PR #506 now sends these through the production binary and asserts atomic fallback:

    Independent correctness gates (existing issues)

    Selectors and vector-matching modifiers remain out of the ASAPQuery accelerated contract; Elasticsearch is intentionally excluded per scope.

  2. added
    enhancementNew feature or request
    meta: trackingUmbrella issue coordinating multiple implementation gaps
    area: control planePlanning, configuration, routing, and control-plane orchestration
    area: data planeRuntime ingestion, storage, and query-serving data paths
    area: query enginePromQL lowering, execution, result shaping, and fallback behavior
    area: physical compilerCompilation from selected logical plans to executable backend and Collector plans
    area: summary executionWarm-summary binding, readout, composition, and result decoding
    integration: ASAPPlannerASAPPlanner API, IR, candidate, and selected-plan integration
    feature: PromQLPromQL compatibility and execution semantics
    feature: warm summariesASAP warm-tier materialization, readiness, and serving
    feature: sketch algorithmsSketch-family configuration, lifecycle, merge, and readout behavior
    feature: range evaluationRange-query steps, windows, timestamps, and temporal evaluation
    feature: Top-KTop-K planning, heap materialization, ranking, and labels
    quality: accuracyExact and approximate accuracy contracts, error bounds, and routing
    feature: workload optimizationCross-query sharing, costing, placement, and physical configuration selection
    test: end-to-endProcess-boundary, differential, conformance, and full-stack tests
    on Sep 4, 2026
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: Top-KTop-K planning, heap materialization, ranking, and labelsfeature: range evaluationRange-query steps, windows, timestamps, and temporal evaluationfeature: sketch algorithmsSketch-family configuration, lifecycle, merge, and readout behaviorfeature: warm summariesASAP warm-tier materialization, readiness, and servingfeature: workload optimizationCross-query sharing, costing, placement, and physical configuration selectionintegration: ASAPPlannerASAPPlanner API, IR, candidate, and selected-plan integrationmeta: trackingUmbrella issue coordinating multiple implementation gapsquality: accuracyExact and approximate accuracy contracts, error bounds, and routingtest: end-to-endProcess-boundary, differential, conformance, and full-stack tests

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions