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/14 10:06:08 UTC

[GitHub] [arrow-datafusion] Ted-Jiang commented on a change in pull request #1991: Add doc for EXTRACT, date_part

Ted-Jiang commented on a change in pull request #1991:
URL: https://github.com/apache/arrow-datafusion/pull/1991#discussion_r825776860



##########
File path: docs/source/user-guide/sql/datafusion-functions.md
##########
@@ -84,3 +84,31 @@ Note that `CAST(.. AS Timestamp)` converts to Timestamps with Nanosecond resolut
 - Other Timestamp() columns or values
 
 Note that `CAST(.. AS Timestamp)` converts to Timestamps with Nanosecond resolution; this function is the only way to convert/cast to seconds resolution.
+
+## `EXTRACT, date_part`
+
+`EXTRACT(field FROM source)`
+
+- The extract function retrieves subfields such as year or hour from date/time values.
+  source must be a value expression of type timestamp, Data32, Data64 field is an identifier that selects what field to extract from the source value.
+  The extract function returns values of type u32.

Review comment:
       @liukun4515 We need  a discussion  about wether need support negative `timestamp `or `date`




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