mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-27 02:10:38 +00:00
* feat(tql): resolve conflicts after merge,formatting and clippy issues, add sqlness tests, adjust explain with start, end, step * feat(tql): adjust sqlness assertions
32 lines
2.6 KiB
Plaintext
32 lines
2.6 KiB
Plaintext
CREATE TABLE test(i DOUBLE, j TIMESTAMP TIME INDEX, k STRING PRIMARY KEY);
|
|
|
|
Affected Rows: 0
|
|
|
|
INSERT INTO test VALUES (1, 1, "a"), (1, 1, "b"), (2, 2, "a");
|
|
|
|
Affected Rows: 3
|
|
|
|
-- SQLNESS REPLACE (RoundRobinBatch.*) REDACTED
|
|
TQL EXPLAIN (0, 10, '5s') test;
|
|
|
|
+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| plan_type | plan |
|
|
+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| logical_plan | PromInstantManipulate: range=[0..0], lookback=[300000], interval=[300000], time index=[j] |
|
|
| | PromSeriesNormalize: offset=[0], time index=[j], filter NaN: [false] |
|
|
| | PromSeriesDivide: tags=["k"] |
|
|
| | Sort: test.k DESC NULLS LAST, test.j DESC NULLS LAST |
|
|
| | TableScan: test projection=[i, j, k], partial_filters=[j >= TimestampMillisecond(-300000, None), j <= TimestampMillisecond(300000, None)] |
|
|
| physical_plan | PromInstantManipulateExec: range=[0..0], lookback=[300000], interval=[300000], time index=[j] |
|
|
| | PromSeriesNormalizeExec: offset=[0], time index=[j], filter NaN: [false] |
|
|
| | PromSeriesDivideExec: tags=["k"] |
|
|
| | RepartitionExec: partitioning=REDACTED
|
|
| | ExecutionPlan(PlaceHolder) |
|
|
| | |
|
|
+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
DROP TABLE test;
|
|
|
|
Affected Rows: 1
|
|
|