mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-04 12:22:55 +00:00
* feat(WIP): MergeSort * wip * feat: MergeSort LogicalPlan * update sqlness result * Apply suggestions from code review Co-authored-by: Lei, HUANG <6406592+v0y4g3r@users.noreply.github.com> * refactor: per review advice * refactor: more per review * chore: per review --------- Co-authored-by: Ruihang Xia <waynestxia@gmail.com> Co-authored-by: Lei, HUANG <6406592+v0y4g3r@users.noreply.github.com>
40 lines
920 B
Plaintext
40 lines
920 B
Plaintext
CREATE TABLE demo(
|
|
host STRING,
|
|
ts TIMESTAMP,
|
|
cpu DOUBLE NULL,
|
|
memory DOUBLE NULL,
|
|
disk_util DOUBLE DEFAULT 9.9,
|
|
TIME INDEX (ts),
|
|
PRIMARY KEY(host)
|
|
)
|
|
PARTITION ON COLUMNS (host) (
|
|
host < '550-A',
|
|
host >= '550-A' AND host < '550-W',
|
|
host >= '550-W'
|
|
);
|
|
|
|
Affected Rows: 0
|
|
|
|
-- SQLNESS REPLACE (-+) -
|
|
-- SQLNESS REPLACE (\s\s+) _
|
|
-- SQLNESS REPLACE (RoundRobinBatch.*) REDACTED
|
|
-- SQLNESS REPLACE (Hash.*) REDACTED
|
|
-- SQLNESS REPLACE (peers.*) REDACTED
|
|
explain SELECT * FROM demo WHERE ts > cast(1000000000 as timestamp) ORDER BY host;
|
|
|
|
+-+-+
|
|
| plan_type_| plan_|
|
|
+-+-+
|
|
| logical_plan_| MergeSort: demo.host ASC NULLS LAST_|
|
|
|_|_MergeScan [is_placeholder=false]_|
|
|
| physical_plan | SortPreservingMergeExec: [host@0 ASC NULLS LAST]_|
|
|
|_|_SortExec: expr=[host@0 ASC NULLS LAST], preserve_partitioning=[true]_|
|
|
|_|_MergeScanExec: REDACTED
|
|
|_|_|
|
|
+-+-+
|
|
|
|
drop table demo;
|
|
|
|
Affected Rows: 0
|
|
|