Conversation
This was referenced Sep 30, 2026
…tile over time Per-series windows evaluate these PromQL range functions with Prometheus semantics over fresh (non-stale) samples. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, without and @ Each Fallback selector reads its own raw-series slot. Vector-vector arithmetic uses PromQL one-to-one matching with on/ignoring via new series_labels and series_binary operators; without grouping rewrites the series identity; @ <timestamp> fixes selector and subquery evaluation. Conflicts with earlier stack changes resolved to the integration tree: - crates/asap-physical-operators/src/operators/mod.rs: 9a13ae4 integrate: extend asap-types series identity with #486/#487 shapes - crates/asap-physical-operators/src/physical_planner/promql_rows.rs: 9a13ae4 integrate: extend asap-types series identity with #486/#487 shapes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…antile IR needs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#477 moved PromQL series-identity resolution into asap-types. The fallback shapes compiled by #486 and #487 (time shifts, subqueries, scalar bridges, and arithmetic between series) also need identity realization there. Taken from integration commit 9a13ae4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zzylol
force-pushed
the
feat/physical-compile-promql-fallback
branch
from
September 30, 2026 18:27
a4d7e16 to
fd0bb0a
Compare
zzylol
force-pushed
the
feat/physical-compile-coverage-3
branch
from
September 30, 2026 18:27
eb34e4f to
d4375b3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #486.
Rebuilt into the linear stack on main. New
integrate:commit(s) fold in integration-branch resolutions this PR needs on top of the earlier stack: "extend asap-types series identity with #486/#487 shapes". Conflict resolutions are recorded in the messages of: "feat(physical): compile multi-selector PromQL fallbacks with matching, without and @".Why
#486 compiles a retained PromQL subtree (
Fallback) only when it reads one selector and uses a small set of range functions. Common backend queries such asrate(a[5m]) / rate(b[5m]),sum without (instance) (m),irate(m[5m])andm @ 1700000000still go through the backend's own lowering (coverage rows 28 and 30).What
Fallbackgets its own raw-series input slot,promql_fallback::raw_series_input(node, i). The lowering is now a small operator DAG.on(...)andignoring(...). There are two new operators.series_labelsrewrites a row's label set, either the series identity or the plain label columns.series_binarymatches equal label sets. A duplicate match group is an error, as in Prometheus. The result drops__name__.withoutaggregation reusesseries_labels, so the identity drops the excluded labels and__name__.irate,idelta,changes,resets,last_over_time, and exactquantile_over_time.@ <timestamp>works on selectors and subqueries.@ start()and@ end()are rejected because they depend on the range query.histogram_quantile, which is not implemented here.Before this PR
After this PR
With
a{job=x,inst=1} = 10andb{job=x,inst=2} = 4:With
a{job=x,inst=1}=1,a{job=x,inst=2}=2,a{job=y,inst=1}=4,sum without (inst) (a)returns{job="x"} 3, {job="y"} 4. Each case matches a hand-computed Prometheus result intests/promql_fallback.rs.Remaining
histogram_quantile: the IR must carry thelecolumn andwithout (le)grouping. The doc lists the full requirements.group_leftandgroup_right, and non-literal scalar operands.@ start()and@ end(), other subquery operands, and other functions.Validation
cargo fmt --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspace --no-fail-fastAn independent reviewer agent, which did not write the code, reviewed the diff. Its three findings are fixed, with regression tests:
Two behaviors are deliberately unchanged. Results other than vector matching and
withoutkeep__name__, following #486's adapter contract. NaNqdoes not survive a JSON round-trip, which is an existing limitation.🤖 Generated with Claude Code