[ 
https://issues.apache.org/jira/browse/ARROW-15032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17456823#comment-17456823
 ] 

Rok Mihevc commented on ARROW-15032:
------------------------------------

What worries me a little bit is that if you make a struct array that you then 
access from python per row you might not really see performance benefits. What 
use case are you thinking about?

Besides there are many possible struct one can make from a timestamp and I 
imagine we don't want many in arrow?

I might be missing something here though..

Another option would be to make a generic kernel kinda like strftime that would 
return a struct array.

> [C++] Compute Function to return Year / Month / Day
> ---------------------------------------------------
>
>                 Key: ARROW-15032
>                 URL: https://issues.apache.org/jira/browse/ARROW-15032
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: C++
>            Reporter: Will Ayd
>            Priority: Minor
>              Labels: kernel
>
> Related to
> [https://stackoverflow.com/questions/70194714/how-to-return-a-structarray-from-multiple-scalar-functions/70213443#70213443]
>  
> Right now the temporal compute functions include year / month / day as 
> separate functions. AFAICT in the implementation these all internally create 
> a struct containing year/month/day using the date library and then return 
> only one of the components.
>  
> From a pure efficiency perspective it might be best to just return all as one 
> StructArray and allow the user to unpack the values. From a user perspective, 
> I also typically want year / month / day to be bundled together, so one 
> function call to get all three in one pass would be ideal
>  
> This might be extendable down to the timestamp structure as well



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to