Add push inequality filter expression below join rule#12236
Add push inequality filter expression below join rule#12236sopel39 merged 1 commit intotrinodb:masterfrom
Conversation
f36a8a1 to
ae746fa
Compare
There was a problem hiding this comment.
Can we reuse leftComparisonSymbols here ?
There was a problem hiding this comment.
isComparisonAligned was used in two places so I had to add JoinNodeContext to reuse leftComparisonSymbols
There was a problem hiding this comment.
Will this be quadratic complexity ?
Maybe reuse Set<Symbol> leftSymbols here
There was a problem hiding this comment.
yes, it could be quadratic. I refactored the code to avoid this.
|
lgtm % @raunaqmorarka comments |
Add rule that pushes complex expressions (not symbol references) in the join filter to the join build side to allow for dynamic filters to be applied
ae746fa to
f2b4cf6
Compare
lukasz-stec
left a comment
There was a problem hiding this comment.
I refactored the code a little bit to avoid quadratic complexity of isComparisonAligned + avoid recalculation of joinNode left and right output symbols sets
| /** | ||
| * Rule that transform plan like | ||
| * <pre> {@code | ||
| * filter: expr(l) > expr(r) |
There was a problem hiding this comment.
this is potentially unsafe to pushdown if expr(r) might fail. cc @martint
Description
Add rule that pushes complex expressions (not symbol references) in the join filter to the join build side to allow for dynamic filters to be applied
The rule support inequality operators only (<,<=, >,>=). It currently does not support
BETWEENoperator.improvement
core query engine - planner
Improve performance of joins with inequality conditions
Related issues, pull requests, and links
Fixes #5755
Documentation
( ) No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.
Release notes
( ) No release notes entries required.
( ) Release notes entries required with the following suggested text: