-
-
Notifications
You must be signed in to change notification settings - Fork 238
prevent RangeJoinHeap plans over Filter nodes #2197
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
Conversation
| }, | ||
| }, | ||
| { | ||
| q: "select * from vals join ranges on val between min and max where min >= 2 and max <= 5", |
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.
these two trigger the panic? could we get a couple more with some of the other rejected node types, like LIMIT, ORDER BY, PROJECT, DISTINCT. I think LIMIT and DISTINCT are both group properties, so maybe have to be checked separately
| }, | ||
| }, | ||
| { | ||
| q: "select * from vals join (select * from ranges where min >= 2 and max <= 5 limit 1) ranges on val between min and max", |
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.
i don't think this one is valid as a rangeHeap, should block this transform
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.
distinct is another one that might error, because we don't materialize it into the tree until after join planning
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.
lgtm, thanks for adding more tests
Currently, we don't have proper handling of nodes that aren't
RangeHeaps in theRangeJoinIter.This PR makes it so that we don't create plans that would have these nodes.
Additionally, we error instead of panicking when we see an invalid node in this area.
fixes dolthub/dolt#7139