-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Two bugs: - `dep_initial_distinct` did not work if the correlated columns were not `[#0, #1, #2]` and so on. - `dep_join_past_agg` was pushing the actual correlated column number instead of the *index* of the correlated column number. This works in the same cases the above bug did (`[#0, #1, #2]` correlated columns), and so it broke for the same reason afaict.
- Loading branch information
Showing
5 changed files
with
50 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,4 +19,4 @@ where | |
l_partkey = p_partkey | ||
); | ||
---- | ||
863.2285714285714285714285714 | ||
863.2285714285715 |
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,20 @@ | ||
include _tpch_tables.slt.part | ||
|
||
# A query with a correlated subquery that retrieves columns out of order | ||
# i.e. the extern columns are not of the format [#0, #1, ...] | ||
# This query has extern columns [#1] | ||
query | ||
select | ||
l_orderkey, | ||
l_partkey, | ||
l_extendedprice, | ||
( | ||
select avg(p_size) | ||
from part | ||
where p_partkey = l_partkey | ||
) as avg_extendedprice | ||
from lineitem | ||
where l_extendedprice > 55000; | ||
---- | ||
1121 200 55010.00 22.0 | ||
4931 200 55010.00 22.0 |
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