jayzhan211 commented on code in PR #26982:
URL: https://github.com/apache/datafusion/pull/26982#discussion_r4434173371
##########
datafusion/pruning/src/pruning_predicate.rs:
##########
@@ -1349,10 +1349,7 @@ fn verify_support_type_for_prune(from_type: &DataType,
to_type: &DataType) -> Re
}
_ => to_type,
};
- // If both types are strings or both are not strings (number, timestamp,
etc)
- // then we can compare them.
- // PruningPredicate does not support casting of strings to numbers and
such.
- if from_type.is_string() == to_type.is_string() {
+ if phys_expr::is_order_preserving_cast(from_type, to_type) {
Review Comment:
Call `is_order_preserving_cast`
--
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]