alamb commented on code in PR #11491:
URL: https://github.com/apache/datafusion/pull/11491#discussion_r1680053247
##########
datafusion/optimizer/src/analyzer/type_coercion.rs:
##########
@@ -86,6 +87,18 @@ fn analyze_internal(
external_schema: &DFSchema,
plan: LogicalPlan,
) -> Result<Transformed<LogicalPlan>> {
+ if let LogicalPlan::Filter(Filter {
Review Comment:
I think this works and handles the special case reasonably
Another way that might be more general purpose would be to coerce the
argument to boolean with
https://docs.rs/datafusion/latest/datafusion/logical_expr/type_coercion/binary/fn.comparison_coercion.html
SO something like
```rust
let predicate = comparison_coercion(DataType::Binary,
predicate.data_type())?;
```
##########
datafusion/optimizer/src/analyzer/type_coercion.rs:
##########
@@ -86,6 +87,18 @@ fn analyze_internal(
external_schema: &DFSchema,
plan: LogicalPlan,
) -> Result<Transformed<LogicalPlan>> {
+ if let LogicalPlan::Filter(Filter {
Review Comment:
If you do this case, you'll have to allow the rest of the coercion proceed
--
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]