zanmato1984 commented on PR #42106:
URL: https://github.com/apache/arrow/pull/42106#issuecomment-2161998009

   > This looks nice as a POC! By the way, seems if_else and switch could be 
migrate to `special_forms`?
   
   Thanks for looking! As for migration to special forms, there is some points 
I want to make:
   1. The way a special form is currently implemented doesn't simply "replace" 
its kernel counter-part. Instead, a special form takes care of the argument 
evaluation, and directly "invokes" the underlying kernel. I think the kernel 
will always be there to serve both direct function call (i.e., not via 
expression system) and expression evaluation.
   2. I'm exposing the special form creation via the `is_special_form` flag in 
`Expression::Call` so that user is free to use either "non-special-form" 
(defaulted) or special form function call.
   3. Whether to use special form or non-special-form in the implementation for 
a specific type of query plan, e.g., substrait, should be fixed though. This 
would happen mostly in the compiling phase: when compiling a function-call-like 
expression, always prefer special form whenever possible; or at least use an 
user option to guide that.
   


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