-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
support cast/try_cast expr in reduceOuterJoin #3621
support cast/try_cast expr in reduceOuterJoin #3621
Conversation
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.
Thanks @AssHero
@@ -438,13 +449,13 @@ mod tests { | |||
None, | |||
)? | |||
.filter(binary_expr( | |||
col("t1.b").gt(lit(10u32)), | |||
cast(col("t1.b"), DataType::Int64).gt(lit(10u32)), |
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 recommend adding a new test explicitly for the cast case (or at least renaming the test) rather than modifying the existing one so it is clear that the case is covered
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'll add some new test cases laster. Thanks!
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.
@AssHero Thanks
LGTM
Benchmark runs are scheduled for baseline = 06a4f79 and contender = 9af2337. 9af2337 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
Which issue does this PR close?
Closes #3565
Rationale for this change
ReduceOuterJoin optimizer support cast or try_cast exprs in predicate.
for query:
select * from t1 left join t2 on t1.t1_id = t2.t2_id where cast(t2.t2_id as int64) < Int64(100);
which contains cast or try_cast expr in where clause,can also be transformed to inner join
select * from t1 inner join t2 on t1.t1_id = t2.t2_id where cast(t2.t2_id as int64) < Int64(100);