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 2022/03/02 14:49:00 UTC

[GitHub] [arrow-datafusion] liukun4515 commented on a change in pull request #1901: support extract second and minute in expr.

liukun4515 commented on a change in pull request #1901:
URL: https://github.com/apache/arrow-datafusion/pull/1901#discussion_r817764497



##########
File path: datafusion-physical-expr/src/datetime_expressions.rs
##########
@@ -351,6 +351,8 @@ pub fn date_part(args: &[ColumnarValue]) -> Result<ColumnarValue> {
     let arr = match date_part.to_lowercase().as_str() {
         "hour" => extract_date_part!(array, temporal::hour),
         "year" => extract_date_part!(array, temporal::year),
+        "minute" => extract_date_part!(array, temporal::minute),

Review comment:
       Do we need to support `month` and other fields?
   As described in the doc https://www.postgresql.org/docs/9.1/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT, There are many files needed to support.
   I think we can support the kernel following this https://github.com/apache/arrow-rs/pull/1376/files in the arrow-rs before next release of arrow-rs.
   I think we can implement the fields which are most used.




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

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