Conversation
zzylol
added a commit
that referenced
this pull request
Sep 30, 2026
…ping Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zzylol
force-pushed
the
fix/series-labels-duplicates
branch
from
September 30, 2026 18:27
17d1c12 to
ad45318
Compare
zzylol
added a commit
that referenced
this pull request
Sep 30, 2026
…modifiers series_binary now implements Prometheus' VectorBinop, VectorAnd/Or/Unless and vector-scalar semantics for Fallback subtrees and query-time Binary nodes, including scalar() operands. Range functions drop __name__ in the Fallback and reject equal label sets. Conflicts with earlier stack changes resolved to the integration tree: - crates/asap-physical-operators/src/physical_planner/promql_rows.rs: a9b8fdd Merge #492 comparison and set coverage with shared series identity typing Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zzylol
force-pushed
the
feat/promql-comparisons-sets
branch
from
September 30, 2026 18:27
90c1713 to
3fcb9e3
Compare
zzylol
added a commit
that referenced
this pull request
Sep 30, 2026
Conflicts with earlier stack changes resolved to the integration tree: - docs/develop_docs/physical-compile-coverage.md: 2bea2f6 Merge #493 classic histogram quantile coverage, without the paragraph that 6d895b7 in this PR adds later. The comparison section from #492 stays, the Remaining list drops the entries both PRs now cover, and the totals count both PRs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zzylol
added a commit
that referenced
this pull request
Sep 30, 2026
This PR's histogram_quantile branch reads a function-level `left_layout`, but #492 restructured `series_labels::execute` to bind it inside each binary branch. Bind it from the operator input in the histogram branch, and format the widened `Kind` match arm. Taken from integration commit 0d132b9. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The frontend dropped the bool modifier, so `a > bool 1` lowered like the filter `a > 1`. A separate variant keeps bool off non-comparisons and reaches both the query-level BinaryOp and the post-ASAP Binary payload. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…modifiers series_binary now implements Prometheus' VectorBinop, VectorAnd/Or/Unless and vector-scalar semantics for Fallback subtrees and query-time Binary nodes, including scalar() operands. Range functions drop __name__ in the Fallback and reject equal label sets. Conflicts with earlier stack changes resolved to the integration tree: - crates/asap-physical-operators/src/physical_planner/promql_rows.rs: a9b8fdd Merge #492 comparison and set coverage with shared series identity typing Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The comparisons, set operators, and group modifiers compiled here share series identity through asap-types (moved there by #477), while promql_rows.rs no longer keeps its own copy. Accept every BinaryOp kind and group modifier in `with_promql_series_identity`, excluding only operands that read the evaluation timestamp. Taken from integration merge a9b8fdd. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zzylol
force-pushed
the
fix/series-labels-duplicates
branch
from
September 30, 2026 20:24
ad45318 to
d0f5f97
Compare
zzylol
force-pushed
the
feat/promql-comparisons-sets
branch
from
September 30, 2026 20:24
3fcb9e3 to
50f4aef
Compare
zzylol
added a commit
that referenced
this pull request
Sep 30, 2026
Conflicts with earlier stack changes resolved to the integration tree: - docs/develop_docs/physical-compile-coverage.md: 2bea2f6 Merge #493 classic histogram quantile coverage, without the paragraph that 6d895b7 in this PR adds later. The comparison section from #492 stays, the Remaining list drops the entries both PRs now cover, and the totals count both PRs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zzylol
added a commit
that referenced
this pull request
Sep 30, 2026
This PR's histogram_quantile branch reads a function-level `left_layout`, but #492 restructured `series_labels::execute` to bind it inside each binary branch. Bind it from the operator input in the histogram branch, and format the widened `Kind` match arm. Taken from integration commit 0d132b9. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
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 #490.
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: "widen shared series identity to every PromQL binary operator". Conflict resolutions are recorded in the messages of: "feat(physical): compile PromQL comparisons, set operators, and group modifiers".Why
compilerejected PromQL comparisons, set operators,group_left/group_right, and non-literal scalar operands, so the backend still had to lower them itself. The frontend also droppedbool, soa > bool 1lowered the same way as the filtera > 1.What
BinaryOpKind::CompareBool(CompareOpKind), sits beside the filteringCompare. The PromQL frontend emits it forbool. I used a variant rather than areturn_boolflag for two reasons: only comparisons acceptbool, and the variant reaches bothQueryExpr::BinaryOpand the post-ASAPBinarypayload without changing any construction sites.Operator::series_binarynow implements Prometheus'VectorBinop,VectorAnd/Or/Unless, and vector-scalar semantics:boolcomparisonsscalar(), and scalar-expression operandsgroup_left/group_rightwith included labelsand/or/unlesswithon/ignoring__name__and duplicate handling as in PrometheusBinarynodes. This replaces the literal projection, the relabel+binary chain, and the grouped relational join.last_over_timenow drops__name__, and series whose label sets then become equal are an error.vector_binary: it now treatsCompareBoolas itsboolmode.Before this PR
After this PR
The results below were checked against hand-computed Prometheus results.
{job=x} 10, {job=y} 20, {job=w} 0, {job=n} NaN:a > 5givesa{job=x} 10, a{job=y} 20.a > bool 5gives{job=n} 0, {job=w} 0, {job=x} 1, {job=y} 1.a * on(job) group_left(team) infogives{inst=1,job=x,team=t1} 20, ….sum(a) or vector(0)gives{} 0whenais empty.rate(...)over series whose label sets are equal without the name fails with "vector cannot contain metrics with the same labelset".Remaining
Binaryfilters and set operators fail closed. Stored readouts keep__name__where the range function drops it.group_leftlabel, or right-side labels fromor/group_right, cannot be added to aggregated label-column rows, because the left logical schema has no column for them. Example:sum by (job)(a) * on(job) group_left(team) info.time()operands are not covered.fillmodifiers are still ignored by the frontend. Rejecting them drops 27 corpus queries below the lowering floor.docs/develop_docs/physical-compile-coverage.md.Validation
cargo fmt --all --check,cargo clippy --workspace --all-targets -- -D warnings, andcargo test --workspace --no-fail-fastall pass.The new Fallback tests fail on the base branch's sources and pass here. The new IR tests do not compile on the base branch.
An independent reviewer agent found three bugs, each now covered by a regression test:
a + -scalar(b)boolinvector_binarykept__name____name__The reviewer also found that
or vector(0)was rejected; that is fixed too.🤖 Generated with Claude Code