dennis zhuang
530ff53422
feat(promql): supports quantile and count_values ( #5652 )
...
* feat(promql): supports quantile
* fix: merge_batch
* chore: sqlness test
* test: unit tests
* feat: implements count_values
* fix: typo
* refactor: planner
* chore: apply review suggestions
---------
Co-authored-by: Yingwen <realevenyag@gmail.com >
2025-03-10 06:41:40 +00:00
Ruihang Xia
73ca39f37e
feat: time series distribution in scanner ( #5675 )
...
* define distribution
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* feat: SeqScan support per series distribution
* probe distribution
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* reverse sort order
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* more strict check
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix clippy
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* change null's ordering
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
Co-authored-by: evenyag <realevenyag@gmail.com >
2025-03-10 05:43:17 +00:00
Yingwen
9860bca986
feat: support exact filter on time index column ( #5671 )
...
* feat: add predicate group
* feat: pass predicate group
* feat: memtable prune by time filters
* test: test PruneTimeIterator with time filters
* feat: push down returns exact for timestamp simple filters
---------
Co-authored-by: Ruihang Xia <waynestxia@gmail.com >
2025-03-07 21:55:46 +00:00
Lei, HUANG
56c8c0651f
fix: skip schema check to avoid schema mismatch brought by metadata ( #5662 )
...
* fix: skip schema check to avoid schema mismatch brought by metadata
* docs: add some comment to remind me add that check back
* test: add sqlness case
* fix/skip-schema-check:
### Update CTE Test Cases
- **Added GRPC Latencies Test**: Introduced a new test case for GRPC latencies in `cte.result` and `cte.sql` under `standalone/common/cte`.
- **Removed Redundant Test Files**: Deleted `cte.result` and `cte.sql` under `standalone/common/range` as they were duplicates of the new test case.
2025-03-07 05:47:45 +00:00
discord9
b35eefcf45
perf: rm coalesce batch when target_batch_size > fetch limit ( #5658 )
...
* fix: rm coalesce > limit
* fix: only rm one&test: sqlness
2025-03-07 02:45:07 +00:00
yihong
408dd55a2f
fix: flaky test in sqlness by fix random port ( #5657 )
...
* fix: flaky test in sqlness by fix random port
Signed-off-by: yihong0618 <zouzou0208@gmail.com >
* fix: typo
Signed-off-by: yihong0618 <zouzou0208@gmail.com >
* fix: panic insead of forever loop
Signed-off-by: yihong0618 <zouzou0208@gmail.com >
---------
Signed-off-by: yihong0618 <zouzou0208@gmail.com >
2025-03-07 00:41:22 +00:00
Ruihang Xia
e463942a5b
fix: recover plan schema after dist analyzer ( #5665 )
...
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2025-03-07 00:29:55 +00:00
discord9
0124a0d156
fix: window sort not apply when other column alias to time index name ( #5634 )
...
* fix: other col alias to time index column handle
* test: update sqlness
* chore: per review
* test: more sqlness
* test: mv some to optimizer folder
* fix: resolve alias properly
* fix: also retain old name
* chore: remove wrong comment
* chore: fix sqlness
* test: standalone/dist more projection diff
2025-03-06 08:05:57 +00:00
Weny Xu
1d637cad51
fix(metric-engine): group DDL requests ( #5628 )
...
* fix(metric-engine): group DDL requests
* test: add sqlness tests
* chore: apply suggestions from CR
* chore: apply suggestions from CR
2025-03-05 09:17:47 +00:00
Lei, HUANG
abf1680d14
fix: interval rewrite rule that messes up show create flow function ( #5642 )
...
* fix/interval-cast-rewrite:
### Enhance Interval Parsing and Casting
- **`create_parser.rs`**: Added a test case `test_parse_interval_cast` to verify the parsing of interval casts.
- **`expand_interval.rs`**: Refactored interval casting logic to handle `CastKind` and `format` attributes. Removed the `create_interval` function and integrated its logic directly into the casting process.
- **`interval.result`**: Updated test results to reflect changes in interval representation, switching from `IntervalMonthDayNano` to `Utf8` format for interval operations.
* reformat code
2025-03-04 11:55:25 +00:00
Ruihang Xia
0e2fd8e2bd
feat: rewrite json_encode_path to geo_path using compound type ( #5640 )
...
* function impl
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* tune type
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix clippy and suggestions
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2025-03-04 05:10:12 +00:00
Ruihang Xia
0e097732ca
feat: support some IP related functions ( #5614 )
...
* feat: support some IP related functions
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* sort sqlness result
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* safer shift left
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* sort result again
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* sort result again
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* update against main
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2025-03-04 05:06:25 +00:00
Lei, HUANG
4a277c21ef
fix: properly display CJK characters in table/column comments ( #5633 )
...
fix/comment-in-cjk:
### Update `OptionMap` Formatting and Add Tests
- **Enhancements in `OptionMap`**:
- Changed formatting from `escape_default` to `escape_debug` for better handling of special characters in `src/sql/src/statements/option_map.rs`.
- Added unit tests to verify the new formatting behavior.
- **Test Cases for CJK Comments**:
- Added test cases for tables with comments in CJK (Chinese, Japanese, Korean) characters in `tests/cases/standalone/common/show/show_create.sql` and `show_create.result`.
2025-03-03 12:32:19 +00:00
Ruihang Xia
1c04ace4b0
feat: skip printing full config content in sqlness ( #5618 )
...
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2025-03-03 09:43:55 +00:00
dennis zhuang
87b1408d76
feat: impl topk and bottomk ( #5602 )
...
* feat: impl topk and bottomk
* chore: test and project fields
* refactor: prom_topk_bottomk_to_plan
* fix: order
* chore: adds topk plan test
* chore: comment
Co-authored-by: Yingwen <realevenyag@gmail.com >
---------
Co-authored-by: Yingwen <realevenyag@gmail.com >
2025-03-03 07:32:24 +00:00
xiaoniaoyouhuajiang
50b521c526
feat: add vec_dim function ( #5587 )
...
* feat:add `vec_dim` function
* delete unused imports
* Modified to be implemented correctly
* fix comment
* add order for sqlness test
2025-02-27 15:54:48 +00:00
Weny Xu
904d560175
feat(promql-planner): introduce vector matching binary operation ( #5578 )
...
* feat(promql-planner): support vector matching for binary operation
* test: add sqlness tests
2025-02-27 07:39:19 +00:00
Weny Xu
71e2fb895f
feat: introduce prom_round fn ( #5604 )
...
* feat: introduce `prom_round` fn
* test: add sqlness tests
2025-02-27 03:30:15 +00:00
Ruihang Xia
c9671fd669
feat(promql): implement subquery ( #5606 )
...
* feat: initial implement for promql subquery
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* impl and test
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* refactor
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix clippy
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2025-02-27 03:28:04 +00:00
Ruihang Xia
b5efc75aab
feat(promql): ignore invalid input in histogram plan ( #5607 )
...
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2025-02-27 03:18:20 +00:00
Yingwen
3f6a41eac5
fix: update show create table output for fulltext index ( #5591 )
...
* fix: update full index syntax in show create table
* test: update fulltext sqlness result
2025-02-25 09:36:27 +00:00
Ruihang Xia
7bd108e2be
feat: impl hll_state, hll_merge and hll_calc for incremental distinct counting ( #5579 )
...
* basic impl
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* more tests
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* sqlness test
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix clippy
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* update with more test and logs
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* impl
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* impl merge fn
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* rename function names
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2025-02-24 19:07:37 +00:00
Ruihang Xia
4f988b5ba9
feat: remove default inverted index for physical table ( #5583 )
...
* feat: remove default inverted index for physical table
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* update sqlness result
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2025-02-22 06:48:05 +00:00
Ruihang Xia
d7b6718be0
feat: run sqlness in parallel ( #5499 )
...
* define server mode
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* bump sqlness
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* all good
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* clean up
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* refactor: Move config generation logic from Env to ServerMode
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* finalize
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* change license header
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* rename variables
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* override parallelism
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* rename more variables
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2025-02-21 07:05:19 +00:00
Ruihang Xia
76083892cd
feat: support UNNEST ( #5580 )
...
* feat: support UNNEST
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix clippy and sqlness
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2025-02-21 04:53:56 +00:00
Ruihang Xia
7981c06989
feat: implement uddsketch function to calculate percentile ( #5574 )
...
* basic impl
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* more tests
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* sqlness test
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix clippy
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* update with more test and logs
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2025-02-20 18:59:20 +00:00
dennis zhuang
62a8b8b9dc
feat(promql): supports sort, sort_desc etc. functions ( #5542 )
...
* feat(promql): supports sort, sort_desc etc. functions
* chore: fix toml format and tests
* chore: update deps
Co-authored-by: Weny Xu <wenymedia@gmail.com >
* chore: remove fixme
* fix: cargo lock
* chore: style
---------
Co-authored-by: Weny Xu <wenymedia@gmail.com >
2025-02-19 13:13:49 +00:00
Weny Xu
c8bdeaaa6a
fix(promql-planner): update ctx field columns of OR operator ( #5556 )
...
* fix(promql-planner): update ctx field columns of OR operator
* test: add sqlness test
2025-02-19 11:18:58 +00:00
Weny Xu
7c65fddb30
fix(promql-planner): correct AND/UNLESS operator behavior ( #5557 )
...
* fix(promql-planner): keep field column in left input for AND operator
* test: add sqlness test
* fix: fix unless operator
2025-02-19 09:07:39 +00:00
Weny Xu
aada5c1706
fix(promql-planner): remove le tag in ctx ( #5560 )
...
* fix(promql-planner): remove le tag in ctx
* test: add sqlness test
* chore: apply suggestions from CR
2025-02-19 03:51:27 +00:00
yihong
aa8f119bbb
chore: format all toml files ( #5529 )
...
fix: format some cargo files
Signed-off-by: yihong0618 <zouzou0208@gmail.com >
2025-02-18 12:09:01 +00:00
Yingwen
77223a0f3e
fix: window sort support alias time index ( #5543 )
...
* fix: use alias expr to check commutativity
* chore: debug sort
* feat: consider alias in window sort optimizer
* test: sqlness test
* test: update sqlness result
2025-02-18 10:35:43 +00:00
Ruihang Xia
4ef038d098
fix: correct promql behavior on nonexistent columns ( #5547 )
...
* Revert "fix(promql): ignore filters for non-existent labels (#5519 )"
This reverts commit 33a2485f54 .
* reimplement
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* state safety
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2025-02-17 18:43:50 +00:00
Ruihang Xia
6e8b1ba004
feat: drop noneffective regex filter ( #5544 )
...
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2025-02-15 04:20:26 +00:00
Ruihang Xia
7fc935c61c
feat!: support alter skipping index ( #5538 )
...
* feat: support alter skipping index
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* update test results
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* cargo fmt
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* update sqlness result
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* finalize
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2025-02-14 18:43:21 +00:00
Ruihang Xia
0d19e8f089
fix: promql join operation won't consider time index ( #5535 )
...
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
Co-authored-by: Weny Xu <wenymedia@gmail.com >
2025-02-14 08:21:05 +00:00
Weny Xu
33a2485f54
fix(promql): ignore filters for non-existent labels ( #5519 )
...
* fix(promql): ignore filters for non-existent labels
* chore: add comments
* test: add sqlness test
2025-02-14 06:40:15 +00:00
Yingwen
918517d221
feat: window sort supports where on fields and time index ( #5527 )
...
* feat: handle filter for window sort
* test: sqlness filter test for window sort
* test: add test on tag column filter
* test: test for filter on ts
* test: update sqlness test
2025-02-14 01:38:15 +00:00
Weny Xu
73c29bb482
fix(promql): unescape matcher values ( #5521 )
...
* fix(promql): unescape matcher values
* test: add sqlness tests
* chore: apply suggestions from CR
* feat: use unescaper
2025-02-13 09:42:25 +00:00
Ning Sun
198ee87675
feat: alias database matcher for promql ( #5522 )
...
* feat: provide an alias db matcher for promql
* refactor: rename __db__ to __database__
* chore: fix sqlness test
2025-02-13 08:37:37 +00:00
jeremyhi
02af9dd21a
refactor!: remove datetime type ( #5506 )
...
* feat remove datetime type
* chore: fix unit test
* chore: add column test
* refactor: move create and alter validation to one place
* chore: minor refactor ut
* refactor: rename expr_factory to expr_helper
* chore: remove unnecessary args
2025-02-13 08:01:16 +00:00
Ruihang Xia
8026b1d72c
feat!: unify all index creation grammars ( #5486 )
...
* column options
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* handle table constrain
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* update test assertions
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* change inverted index table constrain usage
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* update sqlness result
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* don't create inverted index for pk on alter table
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* remove remaining pk-as-inverted-index
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* more inverted index magic
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* update sqlness result again
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix clippy
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* Update src/sql/src/statements.rs
Co-authored-by: jeremyhi <jiachun_feng@proton.me >
* drop support for index def in table constrain
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
Co-authored-by: jeremyhi <jiachun_feng@proton.me >
2025-02-12 06:54:09 +00:00
jeremyhi
29218b5fe7
refactor!: unify the option names across all components part2 ( #5476 )
...
* refactor: part2, replace old options in doc yaml
* chore: remove deprecated options
* chore: update config.md
* fix: ut
2025-02-07 13:06:50 +00:00
yihong
79acc9911e
fix: Delete statement not supported in metric engine close #4649 ( #5473 )
...
* fix: Delete statement not supported in metric engine close #4649
Signed-off-by: yihong0618 <zouzou0208@gmail.com >
* fix: do not include Truncate address review comments
Signed-off-by: yihong0618 <zouzou0208@gmail.com >
* fix: address comments
Signed-off-by: yihong0618 <zouzou0208@gmail.com >
* fix: address comment again
Signed-off-by: yihong0618 <zouzou0208@gmail.com >
---------
Signed-off-by: yihong0618 <zouzou0208@gmail.com >
2025-02-07 06:47:53 +00:00
Yingwen
0a169980b7
fix: lose decimal precision when using decimal type as tag ( #5481 )
...
* fix: replicate() of decimal vector lose precision
* test: add sqlness test
* test: drop table
2025-02-06 13:17:05 +00:00
Zhenchi
ab4663ec2b
feat: add vec_add function ( #5471 )
...
* feat: add vec_add function
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
* fix unexpected utf8
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
---------
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
2025-02-06 06:48:50 +00:00
jeremyhi
fac22575aa
refactor!: unify the option names across all components ( #5457 )
...
* refactor: rename grpc options
* refactor: make the arg clearly
* chore: comments on server_addr
* chore: fix test
* chore: remove the store_addr alias
* refactor: cli option rpc_server_addr
* chore: keep store-addr alias
* chore: by comment
2025-02-06 06:37:14 +00:00
Yingwen
0e249f69cd
fix: don't transform Limit in TypeConversionRule, StringNormalizationRule and DistPlannerAnalyzer ( #5472 )
...
* fix: do not transform exprs in the limit plan
* chore: keep some logs for debug
* feat: workaround for limit in other rules
* test: add sqlness tests for offset 0
* chore: add fixme
2025-02-05 11:30:24 +00:00
yihong
adb5c3743c
fix: flush table panic when table has interval column close #3235 ( #5422 )
...
* fix: flash table panic when table has interval column close #3235
Signed-off-by: yihong0618 <zouzou0208@gmail.com >
* Revert "fix: flash table panic when table has interval column close #3235 "
This reverts commit ffc63efda39cd6ef525313b60ede061c5ec24b12.
* fix: create table do not support interval type for now close #3235
Signed-off-by: yihong0618 <zouzou0208@gmail.com >
* fix: sqlness
Signed-off-by: yihong0618 <zouzou0208@gmail.com >
* fix: address comments
Signed-off-by: yihong0618 <zouzou0208@gmail.com >
* fix: address comments fix conflict and more tests
Signed-off-by: yihong0618 <zouzou0208@gmail.com >
* fix: address final comments drop useless sqlness tests
Signed-off-by: yihong0618 <zouzou0208@gmail.com >
---------
Signed-off-by: yihong0618 <zouzou0208@gmail.com >
2025-01-25 08:09:55 +00:00
Weny Xu
b107384cc6
feat(metric-engine): support to write rows with sparse primary key encoding ( #5424 )
...
* feat: support to write rows with sparse primary key encoding
* feat: cache decoded primary key
* chore: remove unused code
* feat: create physical table based on the engine config
* chore: log primary key encoding info
* fix: correct sqlness test
* chore: correct config.md
* chore: apply suggestions from CR
* chore: apply suggestions from CR
2025-01-24 06:56:09 +00:00