-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support more TPC-H queries #791
Merged
Merged
Conversation
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
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
but the result is empty, test data needs update Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
skyzh
approved these changes
Aug 11, 2023
…nto wrj/subquery
Signed-off-by: Alex Chi <[email protected]>
it seems that TPC-H plans are slower to generate than before, but we can improve it later. (make |
Yes. The current CBO has not been fine-tuned. It can be very slow especially with many table joins. We should rethink the strategy to apply rules and may need to explore how to perform RBO in the egg framework. 🥵 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR adds support for all remaining TPC-H queries without correlated subquery, including q7,q8,q12,q13,q14,q19.
Q7 and Q8 have one table appearing twice in the FROM clause.
from nation n1, nation n2 ...
Previously it caused error because columns from both table have the same identifier, but they should be distinct in the query. This PR adds a new field
table_occurence
toColumnRefId
so that columns from n1 and n2 are considered distinct columns in the planner.Q13 is a query containing
as table (column...)
alias on subquery. This PR adds the support in binder.Q12, Q14 and Q19 are simple queries depending on
IN (...)
andCASE
expression. This PR addsin
andif
node to the planner, and supports them in binder and evaluator. Note that we only support IN-value-list in this PR. The IN operator may also be followed by a subquery, as in Q18 and other queries. This will be supported in a follow-up PR.This PR also has several improvements in the optimizer:
SET mock_rowcount_<table_name> = <count>;
The above efforts are aimed to make join reordering really effective. This is critical for queries with many table joins. As a result, the time of Q9 has dropped from ~60s to 2s (#764). You can checkout the plan snapshots in
tests/planner_test/tpch.planner.sql
to see it in action.Benchmark result: