Closed
Conversation
…lled in the optimizer. GetTableReferences(), used in the join order optimizer, relies on the types array having elements. The Operation Converter calls resolveTypes.
…might need to rebind everything if I do it
Mytherin
reviewed
Dec 5, 2023
Collaborator
Mytherin
left a comment
There was a problem hiding this comment.
Thanks for the PR! I'm not too sure about doing this replacement in the optimization phase. It seems to me that we now have two places where EXCEPT/INTERSECT are translated into anti/semi joins - one in the physical planner (plan_set_operation.cpp) and one in this optimizer. I would propose replacing the physical planner one with this implementation entirely, and doing this replacement in the logical planning phase instead.
…ening correlated subqueries
This was referenced Jan 2, 2024
Contributor
Author
|
Closing this as it needs more work |
This file contains hidden or 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
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.
Convert Intersect and Except into Semi and Anti Joins in the optimizer. This allows the join order optimizer to better predict the cardinality of the the operators.
Eventually the join order optimizer will be able to better predict the cardinality of the semi join, then the cardinality of the set operation.
For
INTERSECT ALLandEXCEPT ALLthe cardinality estimator can just use logic used to predict the cardinality of a semi join or of an anti join.