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
    enhancement
    meta: tracking
    area: control plane
    area: data plane
    area: query engine
    area: physical compiler
    area: summary execution
    integration: ASAPPlanner
    feature: PromQL
    feature: warm summaries
    feature: sketch algorithms
    feature: range evaluation
    feature: Top-K
    quality: accuracy
    feature: workload optimization
    test: end-to-end
    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 planearea: data planearea: physical compilerarea: query enginearea: summary executionenhancementfeature: PromQLfeature: Top-Kfeature: range evaluationfeature: sketch algorithmsfeature: warm summariesfeature: workload optimizationintegration: ASAPPlannermeta: trackingquality: accuracytest: end-to-end

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions