Commit Graph
5667 Commits
Author SHA1 Message Date
discord9 7754d08cb9 fix(query): preserve raw scan lifecycle and frame-only reads
Signed-off-by: discord9 <discord9@163.com>
2026-10-26 11:08:50 +08:00
discord9 be00212e46 test(query): format raw series scan fixtures and name their setup
Signed-off-by: discord9 <discord9@163.com>
2026-10-26 11:08:50 +08:00
discord9 c18101bc39 fix(query): merge raw frame partitions at the region boundary
Signed-off-by: discord9 <discord9@163.com>
2026-10-26 11:08:50 +08:00
discord9 e9adb83a01 fix(query): pick the series scanner and keep its partitions
Signed-off-by: discord9 <discord9@163.com>
2026-10-26 11:08:50 +08:00
discord9 a5075f141c fix(datanode): keep a remote read off the raw series path
Signed-off-by: discord9 <discord9@163.com>
2026-10-26 11:04:00 +08:00
discord9 9d3327912f chore(query): format the raw series merge tests
Signed-off-by: discord9 <discord9@163.com>
2026-10-26 11:04:00 +08:00
discord9 b6a864339f feat(query): merge the raw series frames a read returns
Signed-off-by: discord9 <discord9@163.com>
2026-10-26 11:04:00 +08:00
discord9 967886a384 feat(query): let a region answer a read with raw series frames
A raw series frame describes itself: its schema names the layout, the content,
the label mode and the ordering, so a consumer decodes it from the stream alone.
That makes the region's ordinary read path able to carry one - the handler returns
a record-batch stream, and Flight already sends a stream's schema with its
batches. What no region could do was produce one, because nothing asked for it.

A request now says which it wants, rows or frames. Nothing else travels: the
metric is the plan's own table scan, and the label mode, tags, fields and ordering
all come from the region's metadata, so a name, a tag list or an ordering did not
have to be added to the wire.

The read is served by the named binding a region already has - the same one the
PromQL planner uses - and a request that cannot be served fails naming the region,
the metric and the engine. It does not quietly answer with rows: a caller that
asked for frames built its plan around one shape, and different data under the
same question is worse than an error.

Two properties the ordinary path keeps:

- With no read kind the table provider builds exactly the `RegionScanExec` it
  built before. That is the one guard, and it is what every request without an
  explicit opt-in takes.
- A client cannot opt in by setting the extension itself. The region server
  rewrites the key on every read from the decoded plan, so a header value is
  overwritten before the provider sees it. Both halves have a test.

The named binding declines a scan that is not exactly one partition, so this read
is serialised behind one partition whatever the table's partitioning. That is a
limit of the binding, not of the frame, and the comment at the preparation site
says so along with why the alternative that would keep several partitions cannot
be called from this layer yet.

Signed-off-by: discord9 <discord9@163.com>
2026-10-26 11:04:00 +08:00
discord9 05ef1a4326 test(promql): use fixed scalar batch fixture
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-10-26 00:38:30 +08:00
discord9 3c409f91de test(promql): align admission expectations with literal entry
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-10-26 00:23:44 +08:00
discord9 e1e92a28ea test(promql): fix scalar schema ownership and rebuild API
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-10-26 00:17:39 +08:00
discord9 5bcd96cead feat(promql): execute zero-input scalar roots through fused children
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-10-26 00:13:13 +08:00
discord9 9720e1bf88 style(promql): attach native predicate rustdoc directly
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-10-25 21:59:49 +08:00
discord9 1df0cb6af7 test(promql): admit complete aggregate in native shape coverage
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-10-25 21:46:57 +08:00
discord9 463d4a5c8f fix(promql): align aggregate admission with boxed parser inputs
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-10-25 21:35:20 +08:00
discord9 c9426d3cd7 fix(promql): align aggregate row adapters with current native APIs
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-10-25 21:32:09 +08:00
discord9 6fe9d06f65 fix(promql): preserve partial prefix rejection diagnostic
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-10-25 21:25:23 +08:00
discord9 73b9a77932 feat(promql): adapt complete aggregate wiring to recursive native runtime
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-10-25 21:25:05 +08:00
discord9 c90827cf1d style(promql): satisfy strict fused adapter lints
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-10-25 20:12:55 +08:00
discord9 8dbf08d252 feat(promql): execute independent selector scans in fused binary trees
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-10-25 20:10:32 +08:00
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