alamb opened a new issue, #3377: URL: https://github.com/apache/arrow-datafusion/issues/3377
**Is your feature request related to a problem or challenge? Please describe what you are trying to do.** Sometimes predicates include casts. Some of these casts are optimized away during query planning, but some can not be. A practical example of such a cast might be this query to look for data 4 days in the past ```sql cast (now() as bigint) - cast(time as bigint) < 3600 *4 *1000000000 ``` While this particular query will likely be cleaned up into nicer things like `(now() - time) < interval '4 days'` as we fill out the time / date functionality, the pattern will still persist if we have things like ```sql cast(int_col) as Decimal(19,5) < 123.45 ``` Thus, it is important to support the cast during the evaluation of the pruning predicate **Describe the solution you'd like** I would like the expression prunning logic(`PruningPredicate`) to handle expressions such as ```sql cast(time as bigint) < 3600 ``` Note that since the pruning logic is based on comparing min/max values, we must be careful that any casts we apply preserve order. For example, casts from numbers <--> string are likely not correct **Describe alternatives you've considered** N/A **Additional context** Add any other context or screenshots about the feature request here. -- 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...@arrow.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org