alamb opened a new pull request, #9583: URL: https://github.com/apache/arrow-datafusion/pull/9583
…sion-array-functions crate ## Which issue does this PR close? Closes https://github.com/apache/arrow-datafusion/issues/9519 This is an alternate to the design @jayzhan22 implemented in https://github.com/apache/arrow-datafusion/pull/9557 ## Rationale for this change While reviewing [XX](https://github.com/apache/arrow-datafusion/pull/9557) I realized that the suggestion to use `AnalyzerRule`s in the original ticket was somewhat overkill. The core function needed is rewriting `Expr`s (operators specifically) to Functions. Using `AnalyzerRule` requires an entire LogicalPlan ## What changes are included in this PR? Formalizes the general pattern of rewriting certain expressions / operators to function calls, specifically: 1. Add a new `FunctionRewrite` trait 2. Add an API to register `FunctionRewriter`s with `FunctionRegistry` 3. Demonstrate the use of this API by porting the array specific rewrite as a FunctionRewriter ## Are these changes tested? Covered by existing tests ## Are there any user-facing changes? There is a new API that users can use to rewrite DataFusion `Expr`s to their own function calls. -- 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]
