You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/10/11 10:33:07 UTC

[GitHub] [arrow-datafusion] alamb opened a new issue, #3793: Improve coerce API so it doesn't need DF Schema

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

   **Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
   I am trying to use the DataFusion `Expr` struct along with the expression simplification feature -- see https://github.com/apache/arrow-datafusion/issues/3708 and https://github.com/apache/arrow-datafusion/pull/3741 for examples / description of what this means
   
   Type coercion is involved because of this chain:
   * Calling the simplify function
   * invokes the const evaluator 
   * evaluated expressions via `PhysicalExpr
   * which requires the expression types to match  (after #3468)
   
   https://github.com/apache/arrow-datafusion/pull/3758 adds an API to call coerce so that simplify can work in more cases.
   
   However, the API requires a `DFSchema`, some wrapper type over `Schema` that is non trivial to compute. The Simplify API already takes a trait [`SimplifyInfo`](https://docs.rs/datafusion/13.0.0/datafusion/logical_plan/trait.SimplifyInfo.html) to provide just the information required. It would be nice if the coercion function did too, and was called directly as part of the coercion API. 
   
   **Describe the solution you'd like**
   I would like the signature of `coerce` addd in https://github.com/apache/arrow-datafusion/pull/3758 to take a `SimplifyInfo` rather than `DFSchema`
   
   **Describe alternatives you've considered**
   A clear and concise description of any alternative solutions or features you've considered.
   
   **Additional context**
   See https://github.com/influxdata/influxdb_iox/pull/5792 for examples of when IOx uses the simplification (and thus needs to call coerce)


-- 
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-unsubscribe@arrow.apache.org.apache.org

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


Re: [I] Improve coerce API so it doesn't need DF Schema [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed issue #3793: Improve coerce API so it doesn't need DF Schema
URL: https://github.com/apache/datafusion/issues/3793


-- 
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-unsubscribe@datafusion.apache.org

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


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