You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/01/31 16:28:59 UTC

[GitHub] [arrow] jorgecarleitao commented on pull request #9376: ARROW-11446: [DataFusion] Added support for scalarValue in Builtin functions.

jorgecarleitao commented on pull request #9376:
URL: https://github.com/apache/arrow/pull/9376#issuecomment-770408614


   This is ready for a first take.
   
   Some notes:
   
   * This changes the UDF's API: they should now handle `ColumnarValue`, not `ArrayRef`.
   * whenever possible, I used generics instead of macros. I have been reasoning about code more easily with generics because they set the traits explicitly and are therefore IMO easier to use.
   * I had to add a new trait to bridge `ScalarValue` and `ArrowPrimitiveType`
   * I had to implement the `TryFrom` for the timestampNanoseconds.
   * I have not added test coverage to the scalar cases of our existing functions. Longer term, I think we should develop a generic to handle this without having to test the two cases. I tried to do something like this, but I still had to copy-paste some code between generics, unfortunately.
   
   Sorry for the long PR, but I did not find an easy way to split it up (besides #9378, which this PR is built on top of).
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org