alamb commented on code in PR #11491:
URL: https://github.com/apache/datafusion/pull/11491#discussion_r1681816119
##########
datafusion/optimizer/src/analyzer/type_coercion.rs:
##########
@@ -103,6 +104,20 @@ fn analyze_internal(
// select t2.c2 from t1 where t1.c1 in (select t2.c1 from t2 where
t2.c2=t1.c3)
schema.merge(external_schema);
+ if let LogicalPlan::Filter(Filter {
Review Comment:
Thanks @xinlifoobar -- this looks good to me
I am thinking we might be able to avoid the copy -- but we could do it in a
follow on PR too
Now that you have written this, I think maybe we could simply call `cast_to`
something like
```rust
if let LogicalPlan::Filter(filter) = &mut plan {
filter.predicate = filter.predicate.cast_to(&DataType::Boolean,
&filter.schema)?;
}
The cast_to is a no op if the source datatype is the the same as the target
🤔
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]