You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b83918a
Browse filesBrowse the repository at this point in the historyBrowse files
* feat(query-engine): add native instant binary-expr evaluator, staged ahead of cutover
Builds a native (non-DataFusion) implementation of PromQL binary-
arithmetic instant queries: a recursive arm evaluator over
Vec<InstantVectorElement>, plus vector-vector and scalar combiners
lifted from the existing range-binary path. Not yet wired into
production dispatch (handle_query_promql still calls the DataFusion
path) — exposed via handle_query_promql_native for equivalence
testing against the DataFusion path ahead of the Stage 3 cutover.
One accepted, deliberately loud behavior change: an arm with zero
current precomputed data now falls back to Prometheus (matching
"not acceleratable" semantics) instead of DataFusion's silent
empty-result behavior, with a warn! so it's observable.
Part of #567 Stage 2.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* fix(query-engine): reject cross-label-set joins in native binary-expr combiner
combine_vector_vector_native joined two arms purely by positional
KeyByLabelValues equality (a bare Vec<String> of values, no label
names attached). DataFusion's build_binary_vector_plan joins on named
columns instead, so it fails to resolve (-> None) whenever the two
arms don't share the same label set. Native had no equivalent check,
so it could silently fabricate a joined result whenever two
differently-grouped arms' values happened to coincide (e.g.
`sum(a) by (host) + sum(b) by (region)` with a host value equal to a
region value).
combine_vector_vector_native now takes both arms' label-name lists
and returns None on a mismatch, matching DataFusion's failed-join
behavior. Adds four regression tests proving the divergence (three
were red before this fix) plus a same-label-set control case.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* fix(query-engine): enable topk limiting/formatting for binary-expr leaf arms
evaluate_arm_native's leaf branch hardcoded execute_query_pipeline(&ctx,
false, false), so a topk arm inside a binary expression (e.g. `topk(10,
metric) + 0`) never got truncated to k or metric-name-prefixed — both flags
are self-gated on statistic == Topk / a "k" kwarg being present (see
execute_query_pipeline's doc comment), so passing (true, true)
unconditionally is a no-op for non-topk arms, matching what the main
non-binary instant-query path already does.
Adds a regression test proving the divergence: topk(10, ...) + 0 returned
all 15 unformatted rows before this fix, now correctly truncates to 10 with
the metric-name prefix.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
0 commit comments