adriangb commented on code in PR #15764:
URL: https://github.com/apache/datafusion/pull/15764#discussion_r2051557860


##########
datafusion/physical-optimizer/src/pruning.rs:
##########
@@ -1215,8 +1215,33 @@ fn is_compare_op(op: Operator) -> bool {
 // For example, casts from string to numbers is not correct.
 // Because the "13" is less than "3" with UTF8 comparison order.
 fn verify_support_type_for_prune(from_type: &DataType, to_type: &DataType) -> 
Result<()> {
-    // TODO: support other data type for prunable cast or try cast
-    if matches!(
+    // Dictionary casts are always supported as long as the value types are 
supported

Review Comment:
   Thank you @etseidl, I'll implement that instead. I think we do need to keep 
the dict part in here.
   
   Tangential but do any of you know where we have functionality to 
simplify/adapt a PhysicalExpr given a schema eg to remove unnecessary casts or 
add cases where necessary? 



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to