Skip to content

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Runji Wang <[email protected]>
  • Loading branch information
wangrunji0408 committed Nov 24, 2024
1 parent 321e330 commit 1bc5611
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
12 changes: 7 additions & 5 deletions src/planner/rules/partition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ mod tests {
use super::*;

#[test]
fn test_to_parallel() {
fn test_hash_join_to_parallel() {
let input = "
(hashjoin inner true (list a) (list b)
(scan t1 (list a) true)
Expand All @@ -355,10 +355,12 @@ mod tests {
";
let distributed = "
(hashjoin inner true (list a) (list b)
(exchange (hash (list a))
(scan t1 (list a) true))
(exchange (hash (list b))
(scan t2 (list b) true))
(exchange (hash (list a))
(exchange random
(scan t1 (list a) true)))
(exchange (hash (list b))
(exchange random
(scan t2 (list b) true)))
)
";
let output = to_parallel_plan(input.parse().unwrap());
Expand Down
8 changes: 4 additions & 4 deletions tests/sql/merge_join.slt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ insert into t1 values (1, 10), (1, 11), (2, 20);
statement ok
insert into t2 values (1, -10), (1, -11), (3, -30);

query IIII
query IIII rowsort
select *
from (select a, b from t1 order by a, b)
join (select c, d from t2 order by c, d desc) on a = c;
Expand All @@ -20,7 +20,7 @@ join (select c, d from t2 order by c, d desc) on a = c;
1 11 1 -10
1 11 1 -11

query IIII
query IIII rowsort
select *
from (select a, b from t1 order by a)
left join (select c, d from t2 order by c) on a = c;
Expand All @@ -31,7 +31,7 @@ left join (select c, d from t2 order by c) on a = c;
1 11 1 -11
2 20 NULL NULL

query IIII
query IIII rowsort
select *
from (select a, b from t1 order by a)
right join (select c, d from t2 order by c) on a = c;
Expand All @@ -42,7 +42,7 @@ right join (select c, d from t2 order by c) on a = c;
1 11 1 -11
NULL NULL 3 -30

query IIII
query IIII rowsort
select *
from (select a, b from t1 order by a)
full join (select c, d from t2 order by c) on a = c;
Expand Down

0 comments on commit 1bc5611

Please sign in to comment.