shuiyisong
2927fa339e
fix: harden permission checks and process visibility ( #8852 )
...
Signed-off-by: shuiyisong <xixing.sys@gmail.com >
(cherry picked from commit 154f90b365 )
2026-08-21 11:51:11 +08:00
discord9
3dc37d9f9e
test(query): cover legacy JSON2 remote schema identity
...
Signed-off-by: discord9 <discord9@163.com >
2026-08-21 11:51:11 +08:00
discord9
c9c7f0958a
fix(query): adapt MergeScan JSON extension helpers
...
Use the JSON2 extension API introduced by the replayed #8745 patch.
Signed-off-by: discord9 <discord9@163.com >
(cherry picked from commit 6690189d6a07d0bdc03566fed5f2a06306df5cff)
2026-08-21 11:51:11 +08:00
dennis zhuang
c894a2468c
fix(query): preserve timestamp literal semantics in inserts ( #8889 )
...
* fix(query): follow timestamp insert assignment lineage
Signed-off-by: Dennis Zhuang <killme2008@gmail.com >
* fix(query): fold constant insert timestamp literals at the assignment
Following lineage by retyping the source column changed every output
column that reads it: a string column sharing the literal was silently
rewritten to a formatted timestamp, and a nanosecond column was
truncated to the precision of whichever column was converted first.
Resolve the constant read-only and fold it into the assignment
expression instead, which leaves the source query untouched and also
covers literals behind WHERE, ORDER BY and DISTINCT. VALUES rows and
UNION branches carry per-row values, so they keep the in-place rewrite,
now guarded against columns with more than one consumer.
Signed-off-by: Dennis Zhuang <killme2008@gmail.com >
* test(query): strengthen insert lineage regression
Signed-off-by: Dennis Zhuang <killme2008@gmail.com >
* test(query): trim redundant insert coverage
Signed-off-by: Dennis Zhuang <killme2008@gmail.com >
* fix(query): rebuild insert unions loosely and cover UNION distinct
Per review: rebuilding a rewritten union with the strict constructor
rejected legal pre-coercion plans whose untouched columns still differ
across branches. Use try_new_with_loose_types, matching the SQL planner.
Distinct::All joins the rewrite passthrough so UNION (distinct) literals
get session-timezone parsing like UNION ALL; deduplication then keys on
parsed instants instead of raw strings. The top-level rewrite path gains
the same single-consumer guard as rewrite_projection for hand-built DML
plans that share a source column between targets.
Signed-off-by: Dennis Zhuang <killme2008@gmail.com >
* style(query): tighten insert assignment comments
Signed-off-by: Dennis Zhuang <killme2008@gmail.com >
---------
Signed-off-by: Dennis Zhuang <killme2008@gmail.com >
(cherry picked from commit b2fc4b9cba4c0e137cc6f704d88dfe7f187b57aa)
(cherry picked from commit 1775e31a7916cf09a7da8238cebea5e3d74817f7)
2026-08-21 11:51:11 +08:00
Morax
824c5acfa7
fix(query): respect query timezone in timestamp casts ( #8859 )
...
* fix(query): respect timezone in insert values
Signed-off-by: Morax <james20081204@gmail.com >
* fix(query): normalize timestamp casts with query timezone
Signed-off-by: Morax <james20081204@gmail.com >
* fix(query): scope timestamp conversion to insert assignments
Signed-off-by: Morax <james20081204@gmail.com >
* style(query): simplify Arc usage
Signed-off-by: Morax <james20081204@gmail.com >
---------
Signed-off-by: Morax <james20081204@gmail.com >
(cherry picked from commit f479ddb38f3bdaf29fcb2e174bdfb8f5a13c8e19)
(cherry picked from commit a6c99a5334af982888f83b17e592316161b21daf)
2026-08-21 11:51:11 +08:00
fys
4ab29b22f3
refactor(json2): push down json2 type hints to parquet reads ( #8833 )
...
* refactor(mito): push down json2 type hints to parquet reads
Signed-off-by: fys <fengys1996@gmail.com >
* refactor(mito): share json2 target types with arc
Signed-off-by: fys <fengys1996@gmail.com >
* refactor(mito): derive json2 output schema from target types
Signed-off-by: fys <fengys1996@gmail.com >
* refactor(mito): simplify read columns construction
Signed-off-by: fys <fengys1996@gmail.com >
* fix: cargo check
Signed-off-by: fys <fengys1996@gmail.com >
* fix(mito): reject JSON hints for non-JSON2 read columns
Signed-off-by: fys <fengys1996@gmail.com >
* fix: do not pushdown json type hint of non-json2-col
Signed-off-by: fys <fengys1996@gmail.com >
* fix: unit test
Signed-off-by: fys <fengys1996@gmail.com >
* refactor(query): simplify JSON type hint application
Signed-off-by: fys <fengys1996@gmail.com >
* refactor: clean up JSON2 type hint handling
Signed-off-by: fys <fengys1996@gmail.com >
* refactor(mito2): keep JSON2 hints with flat read format
Signed-off-by: fys <fengys1996@gmail.com >
* fix(mito): use raw parquet projection for output schema
Signed-off-by: fys <fengys1996@gmail.com >
* fix(query): note JSON2 hint scope limitation
Signed-off-by: fys <fengys1996@gmail.com >
* refactor(mito): store JSON target types as native types
Signed-off-by: fys <fengys1996@gmail.com >
* test(json2): cover join hint qualifier limitation
Signed-off-by: fys <fengys1996@gmail.com >
* refactor(mito): remove JSON2 fallback from compat cast
Signed-off-by: fys <fengys1996@gmail.com >
* docs(mito): document ReadColumns ordering contract
Signed-off-by: fys <fengys1996@gmail.com >
* fix: cargo clippy
Signed-off-by: fys <fengys1996@gmail.com >
---------
Signed-off-by: fys <fengys1996@gmail.com >
(cherry picked from commit a4f2408141839518608df8a0b144da8383f2d022)
(cherry picked from commit 4a50fba3a2ed0be9a610ed18b295c2c3645d8cc7)
2026-08-21 11:51:11 +08:00
LFC
05c67e4d5f
refactor: separate a json2 extension type ( #8745 )
...
Signed-off-by: luofucong <luofc@foxmail.com >
(cherry picked from commit 0abc3bef18f10c622e3a57f94fd84c6352d12fc9)
(cherry picked from commit b11b0b42f4e2f323ed77e6e2518b75dfa9117469)
2026-08-21 11:51:11 +08:00
discord9
9d8894b7f8
fix(query): validate merge scan remote schema ( #8579 )
...
Reconstructed remote advertised and batch schema validation from 7bf8ba624f against beta2 merge-scan APIs; excludes #8615 dynamic-filter lifecycle changes.
Backport-of: 7bf8ba624f
Signed-off-by: discord9 <discord9@163.com >
(cherry picked from commit 8f6710ba395270f66e4f616baf1f091324f42e2d)
2026-08-21 11:51:11 +08:00
discord9
7d68d8dbe0
fix(query): avoid unsafe count wildcard rewrites ( #8522 )
...
* fix(query): avoid unsafe count wildcard rewrites
Signed-off-by: discord9 <discord9@163.com >
* fix(query): preserve outer count alias
Signed-off-by: discord9 <discord9@163.com >
* fix(query): address review comments on count wildcard rewrite
- Remove the has_projection check: the row count is correct regardless
of whether a projection exists (per review).
- Explain why checking the first input is equivalent to checking all
inputs (a plan with zero inputs falls back to count(1)).
- Rename qa_ prefixed tests to follow the module convention.
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com >
* test(tql): update tql-cte expectations for count wildcard rewrite
The QP-026 count-wildcard fix rewrites count(*) -> count(time_index), so
the EXPLAIN output for the filtered/final CTE aggregates names the
time-index column. Aligns tql-cte.result with the actual output (CI
failure).
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com >
---------
Signed-off-by: discord9 <discord9@163.com >
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com >
(cherry picked from commit 7223f2a9b80a476448e3bded312e072cd1585e2a)
2026-08-21 11:51:11 +08:00
discord9
f9135380b5
feat(flow): add flow statistics and SHOW FLOW STATUS (release slice)
...
Signed-off-by: discord9 <discord9@163.com >
(cherry picked from commit 523c60c53bdc21fd1b1fa43b857e78de710f0d58)
2026-08-21 11:51:11 +08:00
Yingwen
a08d3b7e63
feat: support enabling skip_wal with ALTER TABLE ( #8817 )
...
* feat: support enabling skip_wal with ALTER TABLE (#8730 )
* feat: support enabling skip_wal with alter table
Signed-off-by: jeremyhi <fengjiachun@gmail.com >
* test: cover skip wal on metric physical region
Signed-off-by: jeremyhi <fengjiachun@gmail.com >
* fix: retry skip wal alter on route changes
Signed-off-by: jeremyhi <fengjiachun@gmail.com >
* fix: address skip wal review feedback
Signed-off-by: jeremyhi <fengjiachun@gmail.com >
* fix: preserve skip wal create options
Signed-off-by: jeremyhi <fengjiachun@gmail.com >
* fix: prefer typed skip wal option
Signed-off-by: jeremyhi <fengjiachun@gmail.com >
* fix: address skip wal review comments
Signed-off-by: jeremyhi <fengjiachun@gmail.com >
* fix: canonicalize legacy skip wal option
Signed-off-by: jeremyhi <fengjiachun@gmail.com >
* fix: keep typed skip wal canonical
Signed-off-by: jeremyhi <fengjiachun@gmail.com >
* fix: simplify skip wal option tracking
Signed-off-by: jeremyhi <fengjiachun@gmail.com >
---------
Signed-off-by: jeremyhi <fengjiachun@gmail.com >
Signed-off-by: evenyag <realevenyag@gmail.com >
* test(object-store): fix racy SecureFs abort test (#8720 )
test_writer_abort_is_unsupported_without_atomic_write asserted the file
content immediately after abort() returned Unsupported. SecureFsWriter
writes through tokio::fs::File, whose write_all() only enqueues a blocking
write task (tokio's poll_write returns Ready before the write completes),
so the data may not be visible yet when the test reads the file. Drop the
race-prone content assertion and only verify the Unsupported contract.
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com >
Signed-off-by: evenyag <realevenyag@gmail.com >
---------
Signed-off-by: jeremyhi <fengjiachun@gmail.com >
Signed-off-by: evenyag <realevenyag@gmail.com >
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com >
Co-authored-by: jeremyhi <jiachun_feng@proton.me >
Co-authored-by: Lei, HUANG <6406592+v0y4g3r@users.noreply.github.com >
2026-08-10 15:45:41 +08:00
jeremyhi
448f973593
fix: sandbox SQL local filesystem access ( #8708 )
...
* fix: sandbox SQL local filesystem access
Signed-off-by: jeremyhi <fengjiachun@gmail.com >
* fix: address local file sandbox review findings
Signed-off-by: jeremyhi <fengjiachun@gmail.com >
* fix: support Windows local copy paths
Signed-off-by: jeremyhi <fengjiachun@gmail.com >
* fix: improve sandbox path errors
Signed-off-by: jeremyhi <fengjiachun@gmail.com >
* refactor: simplify local path error context
Signed-off-by: jeremyhi <fengjiachun@gmail.com >
* perf: stream secure filesystem listings
Signed-off-by: jeremyhi <fengjiachun@gmail.com >
* style: derive local file access default
Signed-off-by: jeremyhi <fengjiachun@gmail.com >
* fix: improve local file access errors
Signed-off-by: jeremyhi <fengjiachun@gmail.com >
* fix: address local file access review findings
Signed-off-by: jeremyhi <fengjiachun@gmail.com >
* test: simplify local file access coverage
Signed-off-by: jeremyhi <fengjiachun@gmail.com >
* fix: harden sandboxed local file backends
Signed-off-by: jeremyhi <fengjiachun@gmail.com >
* fix: reject directory copy targets before creation
Signed-off-by: jeremyhi <fengjiachun@gmail.com >
* fix: avoid implicit string clone in file table listing
Signed-off-by: jeremyhi <fengjiachun@gmail.com >
---------
Signed-off-by: jeremyhi <fengjiachun@gmail.com >
2026-07-31 13:23:15 +00:00
LFC
4e04f92591
fix: make select whole json2 column worked ( #8683 )
...
* fix: make select whole json2 column worked
Signed-off-by: luofucong <luofc@foxmail.com >
* resolve PR comments
Signed-off-by: luofucong <luofc@foxmail.com >
* x
Signed-off-by: luofucong <luofc@foxmail.com >
---------
Signed-off-by: luofucong <luofc@foxmail.com >
2026-07-31 13:14:33 +00:00
shuiyisong
c3d8c976a2
feat(query): add native histogram result plumbing ( #8693 )
...
* feat(query): add native histogram result plumbing
Signed-off-by: shuiyisong <xixing.sys@gmail.com >
* fix: cr issue
Signed-off-by: shuiyisong <xixing.sys@gmail.com >
---------
Signed-off-by: shuiyisong <xixing.sys@gmail.com >
2026-07-31 03:14:48 +00:00
discord9
e66d56d1f9
fix(query): handle empty operands in PromQL or ( #8502 )
...
* fix(query): handle empty operands in PromQL or
Signed-off-by: discord9 <discord9@163.com >
* fix(query): preserve schema for empty histograms
Signed-off-by: discord9 <discord9@163.com >
* fix(query): preserve set operation context
Signed-off-by: discord9 <discord9@163.com >
* refactor(query): simplify zero-column error
Signed-off-by: discord9 <discord9@163.com >
---------
Signed-off-by: discord9 <discord9@163.com >
2026-07-30 07:58:37 +00:00
discord9
5ed7128f06
perf(query): prune RangeSelect input projections ( #8570 )
...
* perf(query): prune RangeSelect input projections
Signed-off-by: discord9 <discord9@163.com >
* test(query): stabilize RangeSelect projection snapshot
Signed-off-by: discord9 <discord9@163.com >
* test(query): update RangeSelect nested plan snapshot
Signed-off-by: discord9 <discord9@163.com >
* fix(query): handle nested RangeSelect aliases
Signed-off-by: discord9 <discord9@163.com >
---------
Signed-off-by: discord9 <discord9@163.com >
2026-07-30 07:09:49 +00:00
discord9
32be67c024
fix(query): use physical partition types for metric route pruning ( #8590 )
...
* fix(query): prune logical metric regions after repartition
Signed-off-by: discord9 <discord9@163.com >
* fix(query): centralize conservative region pruning
Signed-off-by: discord9 <discord9@163.com >
* refactor(query): extract pruning metadata helper
Signed-off-by: discord9 <discord9@163.com >
* docs(query): explain pruning metadata helper
Signed-off-by: discord9 <discord9@163.com >
* docs(query): clarify pruning metadata mismatch
Signed-off-by: discord9 <discord9@163.com >
---------
Signed-off-by: discord9 <discord9@163.com >
2026-07-30 07:05:38 +00:00
discord9
9776d88dc8
fix: preserve dictionary regex filter semantics ( #8688 )
...
* fix: preserve dictionary regex filter semantics
Signed-off-by: discord9 <discord9@163.com >
* test(query): update dictionary regex plan results
Signed-off-by: discord9 <discord9@163.com >
---------
Signed-off-by: discord9 <discord9@163.com >
2026-07-30 06:20:57 +00:00
fys
3a904f332f
fix(json2): standardize widening and projection cast semantics ( #8661 )
...
* fix(json2): standardize widening and projection cast semantics
Signed-off-by: fys <fengys1996@gmail.com >
* fix: cargo clippy
Signed-off-by: fys <fengys1996@gmail.com >
* fix: typos
Signed-off-by: fys <fengys1996@gmail.com >
* fix: unit test
Signed-off-by: fys <fengys1996@gmail.com >
* feat: add fast-path
Signed-off-by: fys <fengys1996@gmail.com >
* remove unsed code
Signed-off-by: fys <fengys1996@gmail.com >
* refactor(json2): project nested json_get paths with JsonArray
Signed-off-by: fys <fengys1996@gmail.com >
* fix(query): reject projecting whole JSON2 columns
Signed-off-by: fys <fengys1996@gmail.com >
* fix(query): reject whole-column JSON2 reads
Signed-off-by: fys <fengys1996@gmail.com >
* test(json2): organize limitation sqlness cases
Signed-off-by: fys <fengys1996@gmail.com >
* fix: sqlness test
Signed-off-by: fys <fengys1996@gmail.com >
---------
Signed-off-by: fys <fengys1996@gmail.com >
2026-07-30 04:08:53 +00:00
discord9
255572020a
fix: scope live analyze metrics to streaming requests ( #8644 )
...
Signed-off-by: discord9 <discord9@163.com >
2026-07-28 09:19:23 +00:00
fys
3e67c67607
refactor: simplify scan projection to root column indices ( #8629 )
...
* refactor: simplify scan projection to root column indices
Signed-off-by: fys <fengys1996@gmail.com >
* fix: sqlness test
Signed-off-by: fys <fengys1996@gmail.com >
* chore: code style adjust
Signed-off-by: fys <fengys1996@gmail.com >
* fix: cr
Signed-off-by: fys <fengys1996@gmail.com >
* add comment and test
Signed-off-by: fys <fengys1996@gmail.com >
* minor change
Signed-off-by: fys <fengys1996@gmail.com >
* fix: unit test
Signed-off-by: fys <fengys1996@gmail.com >
---------
Signed-off-by: fys <fengys1996@gmail.com >
2026-07-27 12:04:19 +00:00
discord9
f107f92688
fix(query): harden range time conversion ( #8515 )
...
* fix(query): harden range time conversion
Signed-off-by: discord9 <discord9@163.com >
* Apply suggestions from code review
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com >
---------
Signed-off-by: discord9 <discord9@163.com >
Co-authored-by: dennis zhuang <killme2008@gmail.com >
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com >
2026-07-22 11:57:04 +00:00
discord9
3155d49f84
fix: convert literals in joins and subqueries ( #8501 )
...
* fix: convert literals in joins and subqueries
Signed-off-by: discord9 <discord9@163.com >
* fix: preserve semi joins with duplicate fields
Signed-off-by: discord9 <discord9@163.com >
* test: update limit error after subquery conversion
Signed-off-by: discord9 <discord9@163.com >
---------
Signed-off-by: discord9 <discord9@163.com >
2026-07-22 10:48:26 +00:00
discord9
8b47fd53bd
fix: qualify scalar-subquery tables in persisted views ( #8581 )
...
fix(query): traverse scalar subqueries in views
Signed-off-by: discord9 <discord9@163.com >
2026-07-22 10:43:24 +00:00
discord9
8843dc9104
fix: stabilize remote analyze stage ordering ( #8584 )
...
* fix: stabilize remote analyze stage ordering
Signed-off-by: discord9 <discord9@163.com >
* Update src/query/src/dist_plan/merge_scan.rs
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
---------
Signed-off-by: discord9 <discord9@163.com >
Co-authored-by: Lei, HUANG <6406592+v0y4g3r@users.noreply.github.com >
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-07-22 15:57:19 +08:00
discord9
4a0dd8f9bc
fix(query): preserve bare plan names in analyze json ( #8519 )
...
Signed-off-by: discord9 <discord9@163.com >
2026-07-22 03:33:19 +00:00
discord9
56addd0623
fix: stream remote analyze metrics while pending ( #8405 )
...
* fix: stream remote analyze metrics while pending
Signed-off-by: discord9 <discord9@163.com >
* test: verify flight metrics preserve pending batch
Signed-off-by: discord9 <discord9@163.com >
* fix: preserve direct SST perf queries in plans
Signed-off-by: discord9 <discord9@163.com >
* fix: bind flight metrics capability to query
Signed-off-by: discord9 <discord9@163.com >
---------
Signed-off-by: discord9 <discord9@163.com >
2026-07-21 04:17:50 +00:00
Lei, HUANG
6a53bb053c
feat: enable soft-drop table lifecycle ( #8554 )
...
* feat: add purge_table admin function
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com >
* fix: restrict purge_table to admin
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com >
* fix: keep purge tombstone lookup consistent
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com >
* test: verify soft-drop table lifecycle
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com >
* ci: run soft-drop lifecycle sqlness
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com >
* fix: read purge tombstones authoritatively
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com >
* fix(meta): invalidate soft-drop marker caches
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com >
* feat(meta): enable configurable table soft drop
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com >
* fix(ci): configure gc for soft-drop sqlness
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com >
* fix(meta): close regions before soft-drop metadata
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com >
* fix(meta): avoid rollback after soft-drop tombstone
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com >
* fix(function): validate admin single-row calls
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com >
* fix(meta): log purge dropped table target
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com >
* fix(meta): mark soft-drop config experimental
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com >
* fix: sqlness test base
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com >
---------
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com >
2026-07-20 08:28:35 +00:00
Ruihang Xia
0479c05092
perf: preserve dictionary-encoded query labels ( #8541 )
...
* perf: preserve dictionary-encoded query labels
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix(client): skip dictionary Flight batches
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix(servers): decode dictionary labels in HTTP output
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* test(mito2): support dictionary tags in series scans
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix(servers): preserve dictionary child nulls in SQL
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix(promql): compare dictionary tags by logical nulls
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix(query): keep dictionary tags within query paths
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* refactor(query): scope PK dictionary encoding to reads
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix(query): preserve pushdown for dictionary labels
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix(query): handle dictionary labels in query operators
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix(query): complete label type matching
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix(query): align dictionary query schemas
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix(query): decode incompatible OR labels
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix(query): preserve dictionary partition pruning
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix: handle dictionary query edge cases
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix: import dictionary downcast macro
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2026-07-17 13:57:10 +00:00
discord9
a598690bf7
fix(promql): handle missing labels in or matching ( #8504 )
...
* fix(promql): handle missing labels in or matching
Signed-off-by: discord9 <discord9@163.com >
* test(promql): streamline or matching coverage
Signed-off-by: discord9 <discord9@163.com >
* fix(promql): preserve unmatched rhs series in or
Signed-off-by: discord9 <discord9@163.com >
* perf(promql): stream union distinct inputs
Signed-off-by: discord9 <discord9@163.com >
---------
Signed-off-by: discord9 <discord9@163.com >
2026-07-16 02:29:43 +00:00
discord9
887fdf7513
fix(query): delegate merge sort cardinality effect ( #8532 )
...
Signed-off-by: discord9 <discord9@163.com >
2026-07-16 02:27:09 +00:00
discord9
1122d1e7d7
fix: apply log query limit after expressions ( #8496 )
...
Signed-off-by: discord9 <discord9@163.com >
2026-07-15 05:02:03 +00:00
discord9
623145e635
fix(query): validate DistAnalyzeExec child count ( #8510 )
...
* fix(query): validate DistAnalyzeExec child count
Signed-off-by: discord9 <discord9@163.com >
* test(query): avoid implicit clone lint
Signed-off-by: discord9 <discord9@163.com >
---------
Signed-off-by: discord9 <discord9@163.com >
2026-07-15 01:59:24 +00:00
discord9
b30765e5e9
fix: preserve distributed topk merge ordering ( #8432 )
...
* fix: preserve distributed topk for scalar latest
Signed-off-by: discord9 <discord9@163.com >
* fix: preserve scalar latest ordering across merge scan
Signed-off-by: discord9 <discord9@163.com >
* fix: carry merge scan ordering from planner rewrite
Signed-off-by: discord9 <discord9@163.com >
* test: cover merge scan ordering metadata
Signed-off-by: discord9 <discord9@163.com >
* test: cover merge scan partition ordering gate
Signed-off-by: discord9 <discord9@163.com >
* fix: require adjacent merge sort for ordering metadata
Signed-off-by: discord9 <discord9@163.com >
* test: update ordering sqlness plans
Signed-off-by: discord9 <discord9@163.com >
* fix: preserve distributed topk merge ordering
Signed-off-by: discord9 <discord9@163.com >
* test: cover latest per series queries
Signed-off-by: discord9 <discord9@163.com >
* test: update distributed merge sort sqlness
Signed-off-by: discord9 <discord9@163.com >
* test: cover merge scan ordering partition gate
Signed-off-by: discord9 <discord9@163.com >
* test: cover merge scan over-partition ordering
Signed-off-by: discord9 <discord9@163.com >
* test: cover distributed latest with low parallelism
Signed-off-by: discord9 <discord9@163.com >
* fix: keep distributed merge sort opaque
Signed-off-by: discord9 <discord9@163.com >
* test: assert distributed scalar latest merge sort
Signed-off-by: discord9 <discord9@163.com >
* test: clarify merge scan ordering helper
Signed-off-by: discord9 <discord9@163.com >
* fix: complete merge sort exec delegation
Signed-off-by: discord9 <discord9@163.com >
* docs: explain merge sort limit pushdown
Signed-off-by: discord9 <discord9@163.com >
* test: cover merge sort optimizer opacity
Signed-off-by: discord9 <discord9@163.com >
* docs: explain merge sort optimizer hooks
Signed-off-by: discord9 <discord9@163.com >
* test: cover merge sort optimizer hooks
Signed-off-by: discord9 <discord9@163.com >
* fix: preserve merge sort child topk
Signed-off-by: discord9 <discord9@163.com >
* test: update order by topk plan
Signed-off-by: discord9 <discord9@163.com >
* fix: recognize merge sort global fetch
Signed-off-by: discord9 <discord9@163.com >
---------
Signed-off-by: discord9 <discord9@163.com >
2026-07-14 12:53:07 +00:00
discord9
99235e4b2d
fix: honor exclusive end in log queries ( #8495 )
...
* fix: exclude logs end boundary
Signed-off-by: discord9 <discord9@163.com >
* fix: normalize log query date bounds
Signed-off-by: discord9 <discord9@163.com >
---------
Signed-off-by: discord9 <discord9@163.com >
2026-07-14 06:19:17 +00:00
shuiyisong
d667728fde
chore!: update promql-parser to v0.10.0, remove holt_winters ( #8457 )
...
* chore: update promql parser and fix compile
Signed-off-by: shuiyisong <xixing.sys@gmail.com >
* fix: sqlness
Signed-off-by: shuiyisong <xixing.sys@gmail.com >
* fix: cr issue
Signed-off-by: shuiyisong <xixing.sys@gmail.com >
* fix: cr issue
Signed-off-by: shuiyisong <xixing.sys@gmail.com >
---------
Signed-off-by: shuiyisong <xixing.sys@gmail.com >
2026-07-13 03:27:06 +00:00
discord9
ff2fa71d50
fix: repartition subset partition key joins ( #8460 )
...
Signed-off-by: discord9 <discord9@163.com >
2026-07-10 06:10:28 +00:00
discord9
9936a83384
feat(query): add runtime provider interface ( #8386 )
...
* feat(query): add runtime provider interface
Signed-off-by: discord9 <discord9@163.com >
* docs(query): document runtime provider interface
Signed-off-by: discord9 <discord9@163.com >
* feat(query): pass runtime builder to provider
Signed-off-by: discord9 <discord9@163.com >
* fix(query): make runtime provider fallible
Signed-off-by: discord9 <discord9@163.com >
* fix(query): propagate runtime provider errors
Signed-off-by: discord9 <discord9@163.com >
---------
Signed-off-by: discord9 <discord9@163.com >
2026-07-07 07:18:23 +00:00
jeremyhi
5bcc2e9d6b
fix: global limit for distributed inspect streams ( #8412 )
...
* fix: global limit for distributed inspect streams
Signed-off-by: jeremyhi <fengjiachun@gmail.com >
* fix: honor tighter filter fetch under global limit
Signed-off-by: jeremyhi <fengjiachun@gmail.com >
* fix: restore distribution after global limit
Signed-off-by: jeremyhi <fengjiachun@gmail.com >
* fix: preserve inherited distribution for global limit
Signed-off-by: jeremyhi <fengjiachun@gmail.com >
* fix: propagate inherited hash partitioning
Signed-off-by: jeremyhi <fengjiachun@gmail.com >
---------
Signed-off-by: jeremyhi <fengjiachun@gmail.com >
2026-07-06 07:02:54 +00:00
discord9
4f5dccf6bb
fix(query): push down PromQL cast filters ( #8407 )
...
* fix(query): push down PromQL cast filters
Signed-off-by: discord9 <discord9@163.com >
* test(query): cover cast preimage pushdown
Signed-off-by: discord9 <discord9@163.com >
* test(query): expand cast preimage coverage
Signed-off-by: discord9 <discord9@163.com >
* test(query): compare cast normalization rules
Signed-off-by: discord9 <discord9@163.com >
* test(query): update cast pushdown sqlness plans
Signed-off-by: discord9 <discord9@163.com >
---------
Signed-off-by: discord9 <discord9@163.com >
2026-07-03 09:10:00 +00:00
Weny Xu
2dc6addb66
feat: report region query stats in heartbeat ( #8401 )
...
* feat: report region read load in heartbeat
Signed-off-by: WenyXu <wenymedia@gmail.com >
* feat: expose region query stats in information schema
Signed-off-by: WenyXu <wenymedia@gmail.com >
* chore: update sqlness result
Signed-off-by: WenyXu <wenymedia@gmail.com >
* fix: record region query stats on stream drop
Signed-off-by: WenyXu <wenymedia@gmail.com >
* fix: keep region query cpu stats in nanoseconds
Signed-off-by: WenyXu <wenymedia@gmail.com >
---------
Signed-off-by: WenyXu <wenymedia@gmail.com >
2026-07-03 06:11:57 +00:00
jeremyhi
fc7a9bf56d
fix: handle PromQL time binary aggregation ( #8398 )
...
Signed-off-by: jeremyhi <fengjiachun@gmail.com >
2026-07-02 11:18:58 +00:00
discord9
55852a05b8
feat: stream explain analyze metrics over http ( #8380 )
...
* feat: stream explain analyze metrics over http
Signed-off-by: discord9 <discord9@163.com >
* fix: address analyze stream review comments
Signed-off-by: discord9 <discord9@163.com >
* test: document analyze stream protocol
Signed-off-by: discord9 <discord9@163.com >
* test: update config api expectation
Signed-off-by: discord9 <discord9@163.com >
* fix: track slow queries for analyze stream
Signed-off-by: discord9 <discord9@163.com >
---------
Signed-off-by: discord9 <discord9@163.com >
2026-07-02 06:24:53 +00:00
discord9
5f6b88b782
fix(flow): bind scheduled now in dist plan ( #8389 )
...
Signed-off-by: discord9 <discord9@163.com >
2026-07-01 10:56:30 +00:00
fys
aa563628fb
feat(json2): type hint ( #8247 )
...
* feat(json2): type hint
* test(datatypes): add JsonSettings serde round-trip test
* minor refactor
This reverts commit 7ff5a5249a09be5396536284fe822b5761ef4e6a.
* fix: code review
2026-06-30 07:37:31 +00:00
discord9
d3cc1b1888
feat(flow): stabilize eval interval scheduling ( #8360 )
...
* feat(flow): stabilize eval interval scheduling
Signed-off-by: discord9 <discord9@163.com >
* fix(flow): satisfy eval schedule clippy
Signed-off-by: discord9 <discord9@163.com >
* test(flow): trim eval schedule coverage
Signed-off-by: discord9 <discord9@163.com >
* test(flow): cover stable eval scheduling
Signed-off-by: discord9 <discord9@163.com >
* fix(flow): reserve scheduled runtime hint
Signed-off-by: discord9 <discord9@163.com >
* test(flow): trim sqlness result eof
Signed-off-by: discord9 <discord9@163.com >
* fix(flow): harden eval schedule edges
Signed-off-by: discord9 <discord9@163.com >
* fix(flow): address scheduled flow review
Signed-off-by: discord9 <discord9@163.com >
* fix(flow): clean scheduled config handling
Signed-off-by: discord9 <discord9@163.com >
* test(flow): add eval interval compat case
Signed-off-by: discord9 <discord9@163.com >
* test(flow): cover show create flow in compat
Signed-off-by: discord9 <discord9@163.com >
* fix(flow): drop scheduled time from flow context
Signed-off-by: discord9 <discord9@163.com >
* test(flow): assert scheduled now binding
Signed-off-by: discord9 <discord9@163.com >
---------
Signed-off-by: discord9 <discord9@163.com >
2026-06-29 09:55:27 +00:00
discord9
b72465e679
feat: add remote dynamic filter metrics ( #8309 )
...
* feat: add remote dyn filter metrics
Signed-off-by: discord9 <discord9@163.com >
* fix: unify remote dyn filter payload budget
Signed-off-by: discord9 <discord9@163.com >
* style: import remote dyn filter metrics
Signed-off-by: discord9 <discord9@163.com >
* fix: separate remote dyn filter unregister metrics
Signed-off-by: discord9 <discord9@163.com >
* fix: rename remote dyn filter update outcome metric
Signed-off-by: discord9 <discord9@163.com >
---------
Signed-off-by: discord9 <discord9@163.com >
2026-06-25 10:04:33 +00:00
Lei, HUANG
9b1672316c
fix(metric-engine): report query load under physical region id ( #8355 )
...
* fix(metric-engine): report query load under physical region id
Propagate the physical region ID through the scanner, record batch
stream, and query engine so that query-load metrics (CPU time, scanned
bytes) are attributed to the correct physical region rather than always
to the logical region.
- `src/store-api/src/region_engine.rs` — add `query_load_region_id` to
`ScannerProperties` and `set_query_load_region_id` to `RegionScanner`
trait
- `src/mito2/src/read/seq_scan.rs`,
`src/mito2/src/read/series_scan.rs`,
`src/mito2/src/read/unordered_scan.rs` — implement the new trait
method on each scanner
- `src/common/recordbatch/src/adapter.rs` — carry region id through
`RecordBatchStreamAdapter` into `RecordBatchMetrics`
- `src/table/src/table/scan.rs` — expose region id on `RegionScanExec`
- `src/query/src/datafusion.rs` — extract region id from the physical
plan and set it on the output stream
- `src/query/src/dist_plan/merge_scan.rs` — use metrics-contained region
id in query-load reporting, falling back to the logical region id
- `src/metric-engine/src/engine/read.rs` — set region id on the metric
engine scanner
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com >
* fix(query): satisfy clippy for query load region id
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com >
* fix(query): ignore missing query load region ids
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com >
---------
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com >
Co-authored-by: Lei, HUANG <ratuthomm@gmail.com >
2026-06-25 06:49:28 +00:00
discord9
9cf071808a
fix(query): run optimizer rules before MergeScan ( #8339 )
...
* fix(query): push down join filters before MergeScan
Signed-off-by: discord9 <discord9@163.com >
* fix(query): run optimizer before MergeScan pushdown
Signed-off-by: discord9 <discord9@163.com >
* fix(query): narrow pre-MergeScan filter pushdown
Signed-off-by: discord9 <discord9@163.com >
* fix(query): refine pre-MergeScan optimizer prepass
Signed-off-by: discord9 <discord9@163.com >
* fix(query): satisfy predicate extractor clippy
Signed-off-by: discord9 <discord9@163.com >
* test(query): cover pre-MergeScan optimizer edges
Signed-off-by: discord9 <discord9@163.com >
* test(query): cover set comparison prepass
Signed-off-by: discord9 <discord9@163.com >
* fix(query): guard remote scan filter pushdown
Signed-off-by: discord9 <discord9@163.com >
* fix(query): preserve subquery planning errors
Signed-off-by: discord9 <discord9@163.com >
* fix(query): preserve usable scan predicates
Signed-off-by: discord9 <discord9@163.com >
* fix(query): simplify scan predicate extraction
Signed-off-by: discord9 <discord9@163.com >
* fix(query): keep scan filter extraction scoped
Signed-off-by: discord9 <discord9@163.com >
* docs(query): explain pre-MergeScan optimizer
Signed-off-by: discord9 <discord9@163.com >
---------
Signed-off-by: discord9 <discord9@163.com >
2026-06-23 12:15:40 +00:00
Copilot
58c85dd1ce
fix: guard structured JSON alignment paths against legacy JSONB columns ( #8323 )
...
* Initial plan
* fix: guard structured json alignment to fix Clippy CI failure
- Add `is_structured_json_field` function that only returns true for
fields with both JSON extension type AND Struct Arrow data type
- Replace all usages of `is_json_extension_type` / `has_json_extension_field`
with `is_structured_json_field` to prevent legacy JSONB binary columns
from entering structured JSON alignment paths
- Fix logic in `FlatProjectionMapper::new_with_read_columns` to guard
JSON type hint concretization for JSON2 columns only
- Fix `create_column` in show_create_table.rs to only emit JSON structure
settings for JSON2 columns
- Move `mod tests` to end of flat_projection.rs to fix clippy::items_after_test_module
- Add tests for legacy JSON behavior
* fix: guard narrow_read_columns_by_json_type_hint with is_structured_json_field check
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com >
2026-06-18 05:27:56 +00:00