alamb opened a new pull request, #10330: URL: https://github.com/apache/datafusion/pull/10330
## Which issue does this PR close? Closes https://github.com/apache/datafusion/issues/10181 ## Rationale for this change Rationale: There important use cases for creating `Expr`s and executing them as a `PhysicalExpr` outside the context of a query (for example, to apply delete predicates in delta.rs) At the moment this is possible but is often tricky as users have to manually invoke type coercion and simplification rules to get the `Expr` into a form that can be executed (see example here) After #8045, to use certain expressions that translate to functions it is also important to to apply function rewrite rules. See https://github.com/apache/datafusion/issues/10181 for more details Thus having a proper, tested, documented public API that does this I think is valuable and will prevent future regressions as we continue refactoring. ## What changes are included in this PR? Changes 1. Add `SessionContext::create_physical_expr()` and `SessionState::create_physical_expr()` 2. (TODO) Add function rewrites 4. Update examples to use that 4. (TODO) Add tests for the new API ## Are these changes tested? Yes, new tests ## Are there any user-facing changes? Yes: New API, changed XXX -- 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