-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
39294: exec: fix output batches of LEFT SEMI for hash and merge joiners r=yuzefovich a=yuzefovich Previously, the merge joiner's output batch would always have the columns corresponding to both the left and the right sides (even with LEFT SEMI and LEFT ANTI join types although the right side output would not be used). This is incorrect, and now the merge joiner outputs batches with the correct number of columns. A similar issue was present with LEFT SEMI hash joiner and is now fixed. Release note: None Co-authored-by: Yahor Yuzefovich <[email protected]>
- Loading branch information
Showing
4 changed files
with
76 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# LogicTest: 5node-dist-vec | ||
|
||
statement ok | ||
CREATE TABLE t (k INT, v INT) | ||
|
||
statement ok | ||
INSERT INTO t VALUES (1, 10), (2, 20), (3, 30) | ||
|
||
statement ok | ||
ALTER TABLE t EXPERIMENTAL_RELOCATE VALUES (ARRAY[3], 1) | ||
|
||
statement ok | ||
CREATE TABLE xy (x INT PRIMARY KEY, y INT) | ||
|
||
statement ok | ||
INSERT INTO xy VALUES (2, 200), (3, 300), (4, 400) | ||
|
||
statement ok | ||
ALTER TABLE t SPLIT AT VALUES (3), (4) | ||
|
||
statement ok | ||
ALTER TABLE t EXPERIMENTAL_RELOCATE VALUES (ARRAY[1], 2), (ARRAY[2], 3), (ARRAY[3], 4) | ||
|
||
# Test that LEFT SEMI hash join outputs batches only with the columns from the | ||
# left side. | ||
query II rowsort | ||
SELECT * FROM t WHERE EXISTS(SELECT * FROM xy WHERE x=t.k) | ||
---- | ||
2 20 | ||
3 30 |
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