alamb opened a new issue #1725:
URL: https://github.com/apache/arrow-datafusion/issues/1725


   **Is your feature request related to a problem or challenge? Please describe 
what you are trying to do.**
   I am trying to implement (fast) expression simplification that sits on the 
critical IOx query path (as the predicates get simplified and then used to 
prune out chunks based on catalog statistics)
   
   When i created a PR to use the API proposed in 
https://github.com/apache/arrow-datafusion/pull/1717 for simplify exprs, I 
found out that to get `is_boolean_type()` and `nullable` information from an 
`Expr` I needed to pass it a `DFSchema` (which is a kind of wrapper over a 
normal Arrow Schema). For us in IOx this involves a copy (as we have our own 
wrapper over Schema). 
   
   
   **Describe the solution you'd like**
   I would like to be able to use expression simplification without creating a 
new `DFSchema`.
   
   Specifically
   1. Add a trait that can provide the needed information for schema quries to 
Expr
   1. Change the functions on `Expr` that take a &DFSchema such as 
`Expr::nullable` to be nullable
   3. `impl` this new trait for `DFSchema` so that existing callsites work
   
   
   **Describe alternatives you've considered**
   N/A
   
   **Additional context**
   You can see the code here: 
https://github.com/influxdata/influxdb_iox/pull/3588/files#r796004295


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


Reply via email to