tustvold opened a new issue, #5266:
URL: https://github.com/apache/arrow-rs/issues/5266

   **Is your feature request related to a problem or challenge? Please describe 
what you are trying to do.**
   <!--
   A clear and concise description of what the problem is. Ex. I'm always 
frustrated when [...] 
   (This section helps Arrow developers understand the context and *why* for 
this feature, in addition to  the *what*)
   -->
   
   Currently we provide a mix of kernels for extracting portions of temporal 
types, https://docs.rs/arrow-arith/latest/arrow_arith/temporal/index.html
   
   There are a couple of limitations with this approach:
   
   * The use of generics makes it non-trivial to support types such as 
Time32/Time64 (#5261) or intervals (#TBD)
   * The way the kernels are implemented results in redundant code generation 
for impossible combinations, e.g. a Date32Array with a DataType of Timestamp
   * The use of as_datetime and similar is not only often inefficient, but also 
very hard to follow
   
   **Describe the solution you'd like**
   <!--
   A clear and concise description of what you want to happen.
   -->
   
   I would like to take a similar approach to used in #4465, where we have a 
single method that accepts an operation and array, and then dispatches the 
operation to the specialized implementation for that particular array type. 
Aside from simplifying the implementation, we could also expose this publicly 
to facilitate implementation of the SQL extract function - 
https://www.postgresql.org/docs/current/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT.
   
   The existing kernels would be deprecated and updated to act as simple shims 
to this dynamic dispatch logic, as has been done with the previous datum 
migrations.
   
   **Describe alternatives you've considered**
   <!--
   A clear and concise description of any alternative solutions or features 
you've considered.
   -->
   
   **Additional context**
   <!--
   Add any other context or screenshots about the feature request here.
   -->
   


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