support cast/try_cast expr in reduceOuterJoin#3621
Conversation
| )? | ||
| .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.
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.
I'll add some new test cases laster. Thanks!
|
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);