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


##########
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:
   I don't remember why we we even have this code -- I think it may predate 
unwrapping casts in the logical planning phase so by the time this code sees 
physical expressions it shouldn't have to add casts at all 🤔 



-- 
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