mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-29 19:30:37 +00:00
* check partition for aggr plan Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * handle empty partition rule Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * remove CheckPartition option Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * add test Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * update some valid sqlness result Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * opt-out promql plan and update sqlness Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * fix limit Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * fix insert select subquery Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * update unit test result Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * fix typo Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * Update src/query/src/dist_plan/analyzer.rs Co-authored-by: Yingwen <realevenyag@gmail.com> --------- Signed-off-by: Ruihang Xia <waynestxia@gmail.com> Co-authored-by: Yingwen <realevenyag@gmail.com>
61 lines
1.5 KiB
Plaintext
61 lines
1.5 KiB
Plaintext
CREATE TABLE single_partition(i DOUBLE, j TIMESTAMP TIME INDEX, k STRING PRIMARY KEY);
|
|
|
|
Affected Rows: 0
|
|
|
|
-- SQLNESS REPLACE (-+) -
|
|
-- SQLNESS REPLACE (\s\s+) _
|
|
-- SQLNESS REPLACE (RoundRobinBatch.*) REDACTED
|
|
-- SQLNESS REPLACE (Hash.*) REDACTED
|
|
-- SQLNESS REPLACE (peers.*) REDACTED
|
|
EXPLAIN SELECT COUNT(*) FROM single_partition;
|
|
|
|
+-+-+
|
|
| plan_type_| plan_|
|
|
+-+-+
|
|
| logical_plan_| Aggregate: groupBy=[[]], aggr=[[COUNT(UInt8(1))]]_|
|
|
|_|_Projection:_|
|
|
|_|_MergeScan [is_placeholder=false]_|
|
|
| physical_plan | AggregateExec: mode=Final, gby=[], aggr=[COUNT(UInt8(1))]_|
|
|
|_|_CoalescePartitionsExec_|
|
|
|_|_AggregateExec: mode=Partial, gby=[], aggr=[COUNT(UInt8(1))]_|
|
|
|_|_RepartitionExec: partitioning=REDACTED
|
|
|_|_ProjectionExec: expr=[]_|
|
|
|_|_MergeScanExec: REDACTED
|
|
|_|_|
|
|
+-+-+
|
|
|
|
-- SQLNESS REPLACE (-+) -
|
|
-- SQLNESS REPLACE (\s\s+) _
|
|
-- SQLNESS REPLACE (RoundRobinBatch.*) REDACTED
|
|
-- SQLNESS REPLACE (Hash.*) REDACTED
|
|
-- SQLNESS REPLACE (peers.*) REDACTED
|
|
EXPLAIN SELECT SUM(i) FROM single_partition;
|
|
|
|
+-+-+
|
|
| plan_type_| plan_|
|
|
+-+-+
|
|
| logical_plan_| MergeScan [is_placeholder=false]_|
|
|
| physical_plan | MergeScanExec: REDACTED
|
|
|_|_|
|
|
+-+-+
|
|
|
|
-- SQLNESS REPLACE (-+) -
|
|
-- SQLNESS REPLACE (\s\s+) _
|
|
-- SQLNESS REPLACE (RoundRobinBatch.*) REDACTED
|
|
-- SQLNESS REPLACE (Hash.*) REDACTED
|
|
-- SQLNESS REPLACE (peers.*) REDACTED
|
|
EXPLAIN SELECT * FROM single_partition ORDER BY i DESC;
|
|
|
|
+-+-+
|
|
| plan_type_| plan_|
|
|
+-+-+
|
|
| logical_plan_| MergeScan [is_placeholder=false]_|
|
|
| physical_plan | MergeScanExec: REDACTED
|
|
|_|_|
|
|
+-+-+
|
|
|
|
drop table single_partition;
|
|
|
|
Affected Rows: 0
|
|
|