2010YOUY01 commented on issue #8045:
URL: 
https://github.com/apache/arrow-datafusion/issues/8045#issuecomment-1797907140

   According to the previous prototyping in 
https://github.com/apache/arrow-datafusion/pull/7978, we might need to do 
several cleanups towards this issue.
   
   
   ### Following 2 is necessary for separating `encode()/decode()` and make API 
change (in https://github.com/apache/arrow-datafusion/pull/8046)
   1. 
[`return_type()`](https://github.com/apache/arrow-datafusion/blob/308c35404939ed39e4e398054d6fc78c89817109/datafusion/expr/src/built_in_function.rs#L486)
 now do both input validation and generating output, these responsibilities 
have to be separated
   2. resolve `expr_fn` using function string names as discussed in 
https://github.com/apache/arrow-datafusion/pull/8046#issuecomment-1795967063
   
   
   ### Functionalitiy gaps between `BuiltinScalarFunction` and `ScalarUDF` 
include
   1. aliasing
   2. 
[`monotonicity`](https://github.com/apache/arrow-datafusion/blob/308c35404939ed39e4e398054d6fc78c89817109/datafusion/expr/src/built_in_function.rs#L1320)
   3. Figure out the interface to let core pass information to function 
definitions (e.g. `now()` requires to be passed query start time from core) 
https://github.com/apache/arrow-datafusion/blob/308c35404939ed39e4e398054d6fc78c89817109/datafusion/physical-expr/src/functions.rs#L608
   
   
   ### And other clean-up tasks might be helpful
   1. Can they be moved into function implementations 
https://github.com/apache/arrow-datafusion/blob/308c35404939ed39e4e398054d6fc78c89817109/datafusion/physical-expr/src/functions.rs#L75-L204


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