-
Notifications
You must be signed in to change notification settings - Fork 333
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: dist planner has wrong behavior in table with multiple partitions (
#2237) * fix: dist planner has wrong behavior in table with multiple partitions Signed-off-by: Ruihang Xia <[email protected]> * Update tests/cases/distributed/explain/multi_partitions.sql Co-authored-by: Zhenchi <[email protected]> --------- Signed-off-by: Ruihang Xia <[email protected]> Co-authored-by: Zhenchi <[email protected]>
- Loading branch information
Showing
6 changed files
with
77 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
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 BY RANGE COLUMNS (host) ( | ||
PARTITION r0 VALUES LESS THAN ('550-A'), | ||
PARTITION r1 VALUES LESS THAN ('550-W'), | ||
PARTITION r2 VALUES LESS THAN (MAXVALUE), | ||
); | ||
|
||
Affected Rows: 0 | ||
|
||
-- SQLNESS REPLACE (-+) - | ||
-- SQLNESS REPLACE (\s\s+) _ | ||
-- SQLNESS REPLACE (RoundRobinBatch.*) REDACTED | ||
-- SQLNESS REPLACE (Hash.*) REDACTED | ||
-- SQLNESS REPLACE (peer-.*) REDACTED | ||
explain SELECT * FROM demo WHERE ts > cast(1000000000 as timestamp) ORDER BY host; | ||
|
||
+-+-+ | ||
| plan_type_| plan_| | ||
+-+-+ | ||
| logical_plan_| Sort: demo.host ASC NULLS LAST_| | ||
|_|_MergeScan [is_placeholder=false]_| | ||
| physical_plan | SortExec: expr=[host@0 ASC NULLS LAST]_| | ||
|_|_MergeScanExec: peers=[REDACTED | ||
|_|_| | ||
+-+-+ | ||
|
||
drop table demo; | ||
|
||
Affected Rows: 1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
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 BY RANGE COLUMNS (host) ( | ||
PARTITION r0 VALUES LESS THAN ('550-A'), | ||
PARTITION r1 VALUES LESS THAN ('550-W'), | ||
PARTITION r2 VALUES LESS THAN (MAXVALUE), | ||
); | ||
|
||
-- SQLNESS REPLACE (-+) - | ||
-- SQLNESS REPLACE (\s\s+) _ | ||
-- SQLNESS REPLACE (RoundRobinBatch.*) REDACTED | ||
-- SQLNESS REPLACE (Hash.*) REDACTED | ||
-- SQLNESS REPLACE (peer-.*) REDACTED | ||
explain SELECT * FROM demo WHERE ts > cast(1000000000 as timestamp) ORDER BY host; | ||
|
||
drop table demo; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters