Commit Graph
5647 Commits
Author SHA1 Message Date
discord9 b4c94cbd3a test(promql): align native display and shared-source scan expectations
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-10-25 13:58:20 +08:00
discord9 2c3dace6b2 test(promql): align frame ordering and SQL result sorting
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-10-25 13:47:42 +08:00
discord9 4748081579 feat(promql): fan out a shared raw scan to bound binary inputs
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-10-25 13:47:42 +08:00
discord9 2f967ceb45 test(promql): correct distinct-input arithmetic expectations
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-10-25 13:15:15 +08:00
discord9 39fcdbdbcf feat(promql): lower independently bound vector binary operands
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-10-25 13:14:35 +08:00
discord9 cdf7c01531 feat(promql): resolve runtime input ids from source bindings
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-10-25 13:13:42 +08:00
discord9 6b38352079 test(promql): avoid cloning a selector binding for validation
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-10-25 13:07:56 +08:00
discord9 b1e3b38a28 test(promql): cover selector bounds and recursive binding contracts
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-10-25 13:05:09 +08:00
discord9 3790693dd2 feat(promql): bind selector occurrences without node paths
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-10-25 12:58:22 +08:00
discord9 296b0103b7 chore: sync recursive-runtime metric fixtures before label rename
Signed-off-by: discord9 <discord9@163.com>
2026-10-25 03:54:27 +08:00
discord9 6157479d9a chore: integrate series-label naming with the recursive native POC
Apply only the type rename to the surviving recursive runtime and tests; preserve the removal of global final-label occupancy and speculative split-series admission guards.

Signed-off-by: discord9 <discord9@163.com>
2026-10-25 03:54:27 +08:00
discord9 8115dd708a test(promql): restore the shared pool fixture for metric lifecycle tests
Signed-off-by: discord9 <discord9@163.com>
2026-10-25 03:52:17 +08:00
discord9 7d127f6830 chore: integrate recursive runtime with the minimal native POC
Preserve the POC removal of global output-label occupancy and speculative split-series guards while adopting InputId leaf routing and execution-owned metric handles. Let NativeExecutionState own its recursive root directly.

Signed-off-by: discord9 <discord9@163.com>
2026-10-25 03:50:08 +08:00
discord9 9f1bf087eb test(promql): use an instant-vector subquery boundary case
Signed-off-by: discord9 <discord9@163.com>
2026-10-25 03:39:52 +08:00
discord9 aa4a381f71 refactor(promql): keep fused POC execution partition-local
Remove plan-global label-set occupancy and the speculative split-series tree guard. Keep the native evaluator, finality, memory budgets, errors and ordinary RecordBatch output local to each scan partition.

Narrow native admission to selectors and the small unary POC subset. Document that cross-partition final-label conflicts and semantic merging are outside this POC, and cover real rate/abs(rate) execution across dense and sparse storage spanning SST and memtable data.

Signed-off-by: discord9 <discord9@163.com>
2026-10-25 03:33:49 +08:00
discord9 49558985ba chore: sync narthex before native POC closure
Signed-off-by: discord9 <discord9@163.com>
2026-10-25 03:16:42 +08:00
discord9 3b0587aa8d fix(mito2): read raw series when columnar indexes are not ready
Keep native queries available for unflushed memtables and SSTs with incomplete columnar series or samples coverage by selecting the ordinary raw-series reader. Preserve structural validation and propagate artifact read errors instead of retrying them through legacy execution.

Cover all four incomplete-readiness states in public PromQL queries, both storage scan modes and ordering, complete prepared-source execution, and artifact error propagation.

Signed-off-by: discord9 <discord9@163.com>
2026-10-24 23:01:49 +08:00
discord9 4ad743f0b8 test(promql): register binary metrics before execution
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-10-24 21:12:34 +08:00
discord9 65e93320ed refactor(promql): keep runtime trees owned by their executions
Register each execution's node metric handles once in the physical plan's metrics set. Reading metrics no longer retains or locks runtime topology. Keep historical counters alive after execution drop and cover repeated reads and executions.

Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-10-24 21:09:22 +08:00
discord9 ebfbd2ae5d fix(query): preserve legacy semantics at native admission
Signed-off-by: discord9 <discord9@163.com>
2026-10-24 18:58:51 +08:00
discord9 8388c09d5c chore: merge narthex into refactor/promql-series-labels
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-10-24 18:55:47 +08:00
discord9 1374f70f1d test(promql): feed the newly added native tests through input slots
The histogram-function and range-modifier tests that landed on the branch use
the execution entry points as they were before the runtime took an input
position, so they name the leaf they push at.

Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-10-24 18:55:40 +08:00
discord9 fb9165c29a test(promql): feed the label-rewrite tests through an explicit input slot
The runtime takes an input position now, so the tests that a label rewrite
brought in name the leaf they push at, and the map import no longer carries the
operation type the runtime reads through `MapOp`.

Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-10-24 18:52:06 +08:00
discord9 dd537832b6 test(promql): re-export retained roots after rebuilding
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-10-24 18:52:06 +08:00
discord9 e1c31500d3 test(promql): verify recursive metrics and rebuilt plan isolation
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-10-24 18:52:06 +08:00
discord9 8c62255059 fix(promql): drop terminal input schemas with their slots
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-10-24 18:52:06 +08:00
discord9 475b2d5aef test(promql): verify retained-root cancellation returns every byte
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-10-24 18:52:06 +08:00
discord9 aed40ffa6d test(promql): preserve input routing and partition metric ownership
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-10-24 18:52:06 +08:00
discord9 1bc32e3ee2 test(promql): pass explicit input slots to fused collision fixture
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-10-24 18:52:06 +08:00
discord9 d8058bbd65 style(promql): format recursive aggregate imports
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-10-24 18:52:06 +08:00
discord9 1cfaaab89f refactor(promql): validate fused input trees without node paths
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-10-24 18:52:06 +08:00
discord9 df2ea44bd9 refactor(promql): drive and release the recursive runtime tree
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-10-24 18:52:06 +08:00
discord9 7fb5ac36da test(promql): inspect recursive runtime ownership and release
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-10-24 18:52:06 +08:00
discord9 da9c63dc0e refactor(promql): remove NodePath and own the runtime tree recursively
A node was identified by the path that reached it, so every execution and
every metric export walked that path again, and a node's own state lived in
tables keyed by it. This replaces that with one recursive runtime tree: each
node owns its children, its operator state, its metrics and, once settled,
nothing it no longer needs.

An `InputId` is assigned only to the leaves that actually receive a feed, by a
depth-first walk of the built tree, so a scalar leaf takes no id and no node is
addressed by position. Pulling, settling, flushing after a subtree closes,
EOF, errors and drop all recurse through the same tree.


Signed-off-by: discord9 <discord9@163.com>
2026-10-24 18:52:05 +08:00
Dennis Zhuang 9de4dcb075 chore: merge narthex into feat/narthex-range-modifiers
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>

# Conflicts:
#	src/promql/src/native/display/tests.rs
2026-10-23 23:13:17 +08:00
discord9 990d932198 fix(query): keep label rewrites on the existing plan
Signed-off-by: discord9 <discord9@163.com>
2026-10-23 20:06:13 +08:00
discord9 c6881447c1 fix(promql): bind native input to common scan ordering
Signed-off-by: discord9 <discord9@163.com>
2026-10-23 19:57:39 +08:00
discord9 d62051e12a fix(query): preserve logical metric field order in native scans
Signed-off-by: discord9 <discord9@163.com>
2026-10-23 19:57:39 +08:00
discord9 cd64176418 fix(sql): preserve lookback when displaying TQL view definitions
Signed-off-by: discord9 <discord9@163.com>
2026-10-23 19:57:39 +08:00
discord9 27cd09ec55 fix(query): keep TQL views serializable and expose native diagnostics
Signed-off-by: discord9 <discord9@163.com>
2026-10-23 19:57:39 +08:00
discord9 340ea2d71e fix(query): retain metric table restriction in native scans
Signed-off-by: discord9 <discord9@163.com>
2026-10-23 19:57:38 +08:00
discord9 29ef60f6e8 test(promql): restore scan assignment coverage and update native guide
Signed-off-by: discord9 <discord9@163.com>
2026-10-23 19:57:38 +08:00
discord9 51da078dc8 chore(query): clear the two lints clippy reports on this branch
A doc comment on the categorizer was followed by a blank line, and the test
table builder takes eight arguments. Both are what CI's `-D warnings` turns
into errors; neither changes behaviour.

Signed-off-by: discord9 <discord9@163.com>
2026-10-23 19:57:38 +08:00
discord9 ca804689eb chore(query): share the offset conversion and correct a column-order note
Signed-off-by: discord9 <discord9@163.com>
2026-10-23 19:57:38 +08:00
discord9 8e55a48952 refactor(promql): keep one cross-series predicate for both callers
Signed-off-by: discord9 <discord9@163.com>
2026-10-23 19:57:38 +08:00
discord9 ff1288f178 fix(query): match the raw scan's own field and engine rules
Signed-off-by: discord9 <discord9@163.com>
2026-10-23 19:57:38 +08:00
discord9 de97d86800 fix(query): only offer the native route to an engine that serves frames
Signed-off-by: discord9 <discord9@163.com>
2026-10-23 19:57:38 +08:00
discord9 638d485024 fix(query): decline the native route where it cannot reach a region
Signed-off-by: discord9 <discord9@163.com>
2026-10-23 19:57:38 +08:00
discord9 1ced0f7fdb chore(query): share the range assignment with every caller
Signed-off-by: discord9 <discord9@163.com>
2026-10-23 19:57:38 +08:00
discord9 8efec61743 fix(promql): keep the fused scan's parallelism
Signed-off-by: discord9 <discord9@163.com>
2026-10-23 19:57:38 +08:00