-
Notifications
You must be signed in to change notification settings - Fork 594
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(frontend): Add planning and option in frontend for Lookup Join (#…
…3763) * feat(frontend): Add plan node for batch lookup join * feat(frontend): Add config for using lookup join * feat(frontend): Change batch lookup join to unary node * feat(frontend): Add sources for lookup join node * feat(frontend): Fix bugs in Lookup Join * feat(frontend): Add error handling when data types of two sides of equality predicate are different * feat(frontend): Fix formatting and remove extraneous code * feat(frontend): fix bug * feat(frontend): Add e2e tests * feat(frontend): Fix e2e tests * feat(frontend): Better handling for when lookup join's conditions are not met * feat(frontend): Fix bug with comparing order key and predicate indices * feat(frontend): Refactored code and renamed config to rw_batch_enable_lookup_join * feat(frontend): Fix bug with output indices * feat(frontend): Fix test * feat(frontend): Fix another test * feat(frontend): Fix tests * feat(frontend): Change name and add more e2e tests * feat(frontend): Fix formatting * feat(frontend): Fix test bug Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information
1 parent
7a1331b
commit ff4c0d7
Showing
11 changed files
with
457 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
statement ok | ||
set rw_batch_enable_lookup_join to true; | ||
|
||
statement ok | ||
create table t1 (v1 int, v2 int); | ||
|
||
statement ok | ||
create table t2 (v1 int, v2 int); | ||
|
||
statement ok | ||
insert into t1 values (3, 3); | ||
|
||
statement ok | ||
insert into t2 values (1, 3), (1, 5), (4, 10); | ||
|
||
statement ok | ||
create materialized view t3 as select v1, count(*) as v2 from t2 group by v1; | ||
|
||
query IIII | ||
select * from t1 left join t3 on t1.v1 = t3.v1; | ||
---- | ||
3 3 NULL NULL | ||
|
||
statement ok | ||
insert into t1 values (1, 2); | ||
|
||
query IIII | ||
select * from t1 join t3 on t1.v1 = t3.v1; | ||
---- | ||
1 2 1 2 | ||
|
||
statement error | ||
select * from t1 right join t3 on t1.v1 = t3.v1; | ||
|
||
statement ok | ||
drop materialized view t3; | ||
|
||
statement ok | ||
drop table t1; | ||
|
||
statement ok | ||
drop table t2; | ||
|
||
statement ok | ||
create table t1 (v1 varchar, v2 varchar); | ||
|
||
statement ok | ||
create table t2 (v1 varchar, v2 varchar); | ||
|
||
statement ok | ||
insert into t1 values ('norm', 'forl'); | ||
|
||
statement ok | ||
insert into t2 values ('do', 'gww'), ('f', 'flow'), ('hi', 'hello'); | ||
|
||
statement ok | ||
create materialized view t3 as select count(*) as v1, v2 from t2 group by v2; | ||
|
||
query IIII | ||
select * from t1 left join t3 on t1.v2 = t3.v2; | ||
---- | ||
norm forl NULL NULL | ||
|
||
statement ok | ||
insert into t1 values ('fire', 'gww'); | ||
|
||
query IIII | ||
select * from t1 join t3 on t1.v2 = t3.v2; | ||
---- | ||
fire gww 1 gww | ||
|
||
query IIII | ||
select t1.v2, t3.v2 from t1 join t3 on t1.v2 = t3.v2; | ||
---- | ||
gww gww | ||
|
||
query IIII | ||
select t3.v1 from t1 join t3 on t1.v2 = t3.v2; | ||
---- | ||
1 | ||
|
||
statement error | ||
select * from t1 right join t3 on t1.v1 = t3.v2; | ||
|
||
statement ok | ||
drop materialized view t3; | ||
|
||
statement ok | ||
drop table t1; | ||
|
||
statement ok | ||
drop table t2; | ||
|
||
statement ok | ||
set rw_batch_enable_lookup_join to false; |
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
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
Oops, something went wrong.