You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "JasonLi-cn (via GitHub)" <gi...@apache.org> on 2024/04/12 07:57:56 UTC
[I] Optimization: make the most of Hint::AcceptsSingular when call `make_scalar_function` to Improve performance [arrow-datafusion]
JasonLi-cn opened a new issue, #10053:
URL: https://github.com/apache/arrow-datafusion/issues/10053
### Is your feature request related to a problem or challenge?
When implementing the `ScalarUDFImpl` trait, if the `invoke` calls `make_scalar_function`(eg. [overlay](https://github.com/apache/arrow-datafusion/blob/main/datafusion/functions/src/string/overlay.rs#L71-L78)) we should use `Hint::AcceptsSingular` as much as possible according to the specific situation of the function. Theoretically, overhead can be reduced by avoiding the continuous creation of Arrays.
### Describe the solution you'd like
1. Using Hint::AcceptsSingular in `hints` of `make_scalar_function`.
2. In `inner` of `make_scalar_function`, `ArrayIter` of arg is processed in combination with hints info. If the hint corresponding to arg is `Hint::AcceptsSingular`, then `ArrayIter` adapts to the arg length of the non `Hint::AcceptsSingular` to facilitate `zip` operation.
### Describe alternatives you've considered
_No response_
### Additional context
_No response_
--
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