This repository has been archived by the owner on Dec 9, 2022. It is now read-only.
forked from prestodb/presto
-
Notifications
You must be signed in to change notification settings - Fork 2
Tests for TPCDS queries join ordering #21
Closed
kokosing
wants to merge
6
commits into
starburstdata:epic/cbo/16
from
kokosing:sd/epic/cbo/16/tpcds_plan_utility
Closed
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
37c5bbb
Add TPCDS queries to tpcds connector module
kokosing c4a4ef2
Support TPCDS stats file to store DATE as String
kokosing a089a70
Add statistics for tpcds.sf3000
kokosing a20d9e8
Extract BaseJoinReorderingTest
kokosing 6cc67e9
Add TPCDS expected join ordering files
kokosing a1f880e
Tests for TPCDS queries join ordering
kokosing File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
presto-tpcds/src/test/resources/join_ordering/01.join_ordering
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,13 @@ | ||
cross join: | ||
join (LEFT, REPLICATED): | ||
join (INNER, REPLICATED): | ||
tpcds:customer:sf3000.0 | ||
join (INNER, REPLICATED): | ||
join (INNER, REPLICATED): | ||
tpcds:store_returns:sf3000.0 | ||
tpcds:date_dim:sf3000.0 | ||
tpcds:store:sf3000.0 | ||
join (INNER, REPLICATED): | ||
tpcds:store_returns:sf3000.0 | ||
tpcds:date_dim:sf3000.0 | ||
values |
13 changes: 13 additions & 0 deletions
13
presto-tpcds/src/test/resources/join_ordering/02.join_ordering
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,13 @@ | ||
join (INNER, PARTITIONED): | ||
join (INNER, PARTITIONED): | ||
join (INNER, PARTITIONED): | ||
tpcds:web_sales:sf3000.0 | ||
tpcds:catalog_sales:sf3000.0 | ||
tpcds:date_dim:sf3000.0 | ||
tpcds:date_dim:sf3000.0 | ||
join (INNER, PARTITIONED): | ||
join (INNER, PARTITIONED): | ||
tpcds:web_sales:sf3000.0 | ||
tpcds:catalog_sales:sf3000.0 | ||
tpcds:date_dim:sf3000.0 | ||
tpcds:date_dim:sf3000.0 |
5 changes: 5 additions & 0 deletions
5
presto-tpcds/src/test/resources/join_ordering/03.join_ordering
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,5 @@ | ||
join (INNER, REPLICATED): | ||
join (INNER, REPLICATED): | ||
tpcds:store_sales:sf3000.0 | ||
tpcds:item:sf3000.0 | ||
tpcds:date_dim:sf3000.0 |
95 changes: 95 additions & 0 deletions
95
presto-tpcds/src/test/resources/join_ordering/04.join_ordering
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 @@ | ||
join (INNER, PARTITIONED): | ||
join (INNER, PARTITIONED): | ||
join (INNER, PARTITIONED): | ||
join (INNER, PARTITIONED): | ||
join (INNER, PARTITIONED): | ||
join (INNER, PARTITIONED): | ||
join (INNER, REPLICATED): | ||
tpcds:store_sales:sf3000.0 | ||
tpcds:date_dim:sf3000.0 | ||
tpcds:customer:sf3000.0 | ||
join (INNER, PARTITIONED): | ||
values | ||
join (INNER, PARTITIONED): | ||
values | ||
values | ||
join (INNER, PARTITIONED): | ||
values | ||
join (INNER, PARTITIONED): | ||
values | ||
values | ||
join (INNER, PARTITIONED): | ||
join (INNER, REPLICATED): | ||
tpcds:store_sales:sf3000.0 | ||
tpcds:date_dim:sf3000.0 | ||
tpcds:customer:sf3000.0 | ||
join (INNER, PARTITIONED): | ||
values | ||
join (INNER, PARTITIONED): | ||
values | ||
values | ||
join (INNER, PARTITIONED): | ||
values | ||
join (INNER, PARTITIONED): | ||
values | ||
values | ||
join (INNER, PARTITIONED): | ||
values | ||
join (INNER, PARTITIONED): | ||
values | ||
values | ||
join (INNER, PARTITIONED): | ||
tpcds:customer:sf3000.0 | ||
join (INNER, REPLICATED): | ||
tpcds:catalog_sales:sf3000.0 | ||
tpcds:date_dim:sf3000.0 | ||
join (INNER, PARTITIONED): | ||
values | ||
join (INNER, PARTITIONED): | ||
values | ||
values | ||
join (INNER, PARTITIONED): | ||
values | ||
join (INNER, PARTITIONED): | ||
values | ||
values | ||
join (INNER, PARTITIONED): | ||
tpcds:customer:sf3000.0 | ||
join (INNER, REPLICATED): | ||
tpcds:catalog_sales:sf3000.0 | ||
tpcds:date_dim:sf3000.0 | ||
join (INNER, PARTITIONED): | ||
values | ||
join (INNER, PARTITIONED): | ||
values | ||
values | ||
join (INNER, PARTITIONED): | ||
values | ||
join (INNER, PARTITIONED): | ||
values | ||
values | ||
join (INNER, PARTITIONED): | ||
values | ||
join (INNER, PARTITIONED): | ||
values | ||
values | ||
join (INNER, PARTITIONED): | ||
tpcds:customer:sf3000.0 | ||
join (INNER, REPLICATED): | ||
tpcds:web_sales:sf3000.0 | ||
tpcds:date_dim:sf3000.0 | ||
join (INNER, PARTITIONED): | ||
values | ||
join (INNER, PARTITIONED): | ||
values | ||
values | ||
join (INNER, PARTITIONED): | ||
values | ||
join (INNER, PARTITIONED): | ||
values | ||
values | ||
join (INNER, PARTITIONED): | ||
tpcds:customer:sf3000.0 | ||
join (INNER, REPLICATED): | ||
tpcds:web_sales:sf3000.0 | ||
tpcds:date_dim:sf3000.0 |
20 changes: 20 additions & 0 deletions
20
presto-tpcds/src/test/resources/join_ordering/05.join_ordering
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 @@ | ||
join (INNER, PARTITIONED): | ||
join (INNER, PARTITIONED): | ||
tpcds:store_sales:sf3000.0 | ||
tpcds:store_returns:sf3000.0 | ||
tpcds:date_dim:sf3000.0 | ||
tpcds:store:sf3000.0 | ||
join (INNER, PARTITIONED): | ||
join (INNER, PARTITIONED): | ||
tpcds:catalog_sales:sf3000.0 | ||
tpcds:catalog_returns:sf3000.0 | ||
tpcds:date_dim:sf3000.0 | ||
tpcds:catalog_page:sf3000.0 | ||
join (INNER, PARTITIONED): | ||
join (INNER, PARTITIONED): | ||
tpcds:web_sales:sf3000.0 | ||
join (RIGHT, PARTITIONED): | ||
tpcds:web_sales:sf3000.0 | ||
tpcds:web_returns:sf3000.0 | ||
tpcds:date_dim:sf3000.0 | ||
tpcds:web_site:sf3000.0 |
15 changes: 15 additions & 0 deletions
15
presto-tpcds/src/test/resources/join_ordering/06.join_ordering
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,15 @@ | ||
cross join: | ||
join (LEFT, REPLICATED): | ||
join (INNER, PARTITIONED): | ||
join (INNER, PARTITIONED): | ||
tpcds:customer_address:sf3000.0 | ||
join (INNER, PARTITIONED): | ||
tpcds:customer:sf3000.0 | ||
join (INNER, REPLICATED): | ||
tpcds:store_sales:sf3000.0 | ||
join (INNER, REPLICATED): | ||
tpcds:date_dim:sf3000.0 | ||
tpcds:date_dim:sf3000.0 | ||
tpcds:item:sf3000.0 | ||
tpcds:item:sf3000.0 | ||
values |
9 changes: 9 additions & 0 deletions
9
presto-tpcds/src/test/resources/join_ordering/07.join_ordering
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,9 @@ | ||
join (INNER, PARTITIONED): | ||
join (INNER, REPLICATED): | ||
join (INNER, REPLICATED): | ||
join (INNER, REPLICATED): | ||
tpcds:store_sales:sf3000.0 | ||
tpcds:customer_demographics:sf3000.0 | ||
tpcds:date_dim:sf3000.0 | ||
tpcds:promotion:sf3000.0 | ||
tpcds:item:sf3000.0 |
10 changes: 10 additions & 0 deletions
10
presto-tpcds/src/test/resources/join_ordering/08.join_ordering
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,10 @@ | ||
join (INNER, PARTITIONED): | ||
join (INNER, REPLICATED): | ||
join (INNER, REPLICATED): | ||
tpcds:store_sales:sf3000.0 | ||
tpcds:date_dim:sf3000.0 | ||
tpcds:store:sf3000.0 | ||
tpcds:customer_address:sf3000.0 | ||
join (INNER, PARTITIONED): | ||
tpcds:customer_address:sf3000.0 | ||
tpcds:customer:sf3000.0 |
31 changes: 31 additions & 0 deletions
31
presto-tpcds/src/test/resources/join_ordering/09.join_ordering
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,31 @@ | ||
cross join: | ||
cross join: | ||
cross join: | ||
cross join: | ||
cross join: | ||
cross join: | ||
cross join: | ||
cross join: | ||
cross join: | ||
cross join: | ||
cross join: | ||
cross join: | ||
cross join: | ||
cross join: | ||
cross join: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This one looks weird. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep... this is how we handle this query today, see: prestodb#6944 |
||
tpcds:store_sales:sf3000.0 | ||
tpcds:reason:sf3000.0 | ||
tpcds:store_sales:sf3000.0 | ||
tpcds:store_sales:sf3000.0 | ||
tpcds:store_sales:sf3000.0 | ||
tpcds:store_sales:sf3000.0 | ||
tpcds:store_sales:sf3000.0 | ||
tpcds:store_sales:sf3000.0 | ||
tpcds:store_sales:sf3000.0 | ||
tpcds:store_sales:sf3000.0 | ||
tpcds:store_sales:sf3000.0 | ||
tpcds:store_sales:sf3000.0 | ||
tpcds:store_sales:sf3000.0 | ||
tpcds:store_sales:sf3000.0 | ||
tpcds:store_sales:sf3000.0 | ||
tpcds:store_sales:sf3000.0 |
23 changes: 23 additions & 0 deletions
23
presto-tpcds/src/test/resources/join_ordering/10.join_ordering
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 @@ | ||
cross join: | ||
join (RIGHT, PARTITIONED): | ||
join (INNER, REPLICATED): | ||
tpcds:catalog_sales:sf3000.0 | ||
tpcds:date_dim:sf3000.0 | ||
cross join: | ||
join (RIGHT, PARTITIONED): | ||
join (INNER, REPLICATED): | ||
tpcds:web_sales:sf3000.0 | ||
tpcds:date_dim:sf3000.0 | ||
cross join: | ||
join (RIGHT, PARTITIONED): | ||
join (INNER, REPLICATED): | ||
tpcds:store_sales:sf3000.0 | ||
tpcds:date_dim:sf3000.0 | ||
join (INNER, REPLICATED): | ||
tpcds:customer_demographics:sf3000.0 | ||
join (INNER, REPLICATED): | ||
tpcds:customer:sf3000.0 | ||
tpcds:customer_address:sf3000.0 | ||
values | ||
values | ||
values |
43 changes: 43 additions & 0 deletions
43
presto-tpcds/src/test/resources/join_ordering/11.join_ordering
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,43 @@ | ||
join (INNER, PARTITIONED): | ||
join (INNER, PARTITIONED): | ||
join (INNER, PARTITIONED): | ||
join (INNER, PARTITIONED): | ||
join (INNER, REPLICATED): | ||
tpcds:store_sales:sf3000.0 | ||
tpcds:date_dim:sf3000.0 | ||
tpcds:customer:sf3000.0 | ||
join (INNER, PARTITIONED): | ||
values | ||
join (INNER, PARTITIONED): | ||
values | ||
values | ||
join (INNER, PARTITIONED): | ||
join (INNER, REPLICATED): | ||
tpcds:store_sales:sf3000.0 | ||
tpcds:date_dim:sf3000.0 | ||
tpcds:customer:sf3000.0 | ||
join (INNER, PARTITIONED): | ||
values | ||
join (INNER, PARTITIONED): | ||
values | ||
values | ||
join (INNER, PARTITIONED): | ||
values | ||
join (INNER, PARTITIONED): | ||
values | ||
values | ||
join (INNER, PARTITIONED): | ||
tpcds:customer:sf3000.0 | ||
join (INNER, REPLICATED): | ||
tpcds:web_sales:sf3000.0 | ||
tpcds:date_dim:sf3000.0 | ||
join (INNER, PARTITIONED): | ||
values | ||
join (INNER, PARTITIONED): | ||
values | ||
values | ||
join (INNER, PARTITIONED): | ||
tpcds:customer:sf3000.0 | ||
join (INNER, REPLICATED): | ||
tpcds:web_sales:sf3000.0 | ||
tpcds:date_dim:sf3000.0 |
5 changes: 5 additions & 0 deletions
5
presto-tpcds/src/test/resources/join_ordering/12.join_ordering
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,5 @@ | ||
join (INNER, PARTITIONED): | ||
join (INNER, REPLICATED): | ||
tpcds:web_sales:sf3000.0 | ||
tpcds:date_dim:sf3000.0 | ||
tpcds:item:sf3000.0 |
11 changes: 11 additions & 0 deletions
11
presto-tpcds/src/test/resources/join_ordering/13.join_ordering
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,11 @@ | ||
join (INNER, REPLICATED): | ||
join (INNER, PARTITIONED): | ||
join (INNER, REPLICATED): | ||
join (INNER, REPLICATED): | ||
join (INNER, REPLICATED): | ||
tpcds:store_sales:sf3000.0 | ||
tpcds:date_dim:sf3000.0 | ||
tpcds:customer_address:sf3000.0 | ||
tpcds:household_demographics:sf3000.0 | ||
tpcds:customer_demographics:sf3000.0 | ||
tpcds:store:sf3000.0 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these files needed? I thought the idea was that there is no persistent 'expected' value?
Also, include in the cmt msg how the files were generated (technique, what session settings).
Also, name the files
.txt
to avoid stupid problems like ".join_ordering
is an unknown extension" or whatever.