You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by al...@apache.org on 2024/01/20 10:34:58 UTC

(arrow-datafusion) branch main updated: Minor: Document third argument of `date_bin` as optional and default value (#8912)

This is an automated email from the ASF dual-hosted git repository.

alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git


The following commit(s) were added to refs/heads/main by this push:
     new a4a9429126 Minor: Document third argument of `date_bin` as optional and default value (#8912)
a4a9429126 is described below

commit a4a94291268f5d9cab094618bb1dffa6bba9b290
Author: Andrew Lamb <an...@nerdnetworks.org>
AuthorDate: Sat Jan 20 05:34:52 2024 -0500

    Minor: Document third argument of `date_bin` as optional and default value (#8912)
    
    * Minor: Document third argument of date_bin as optional
    
    # Rationale
    @mhilton  noticed this as part of an internal discussion where we were confused about the output values of `date_bin` for timestamps with timezones (as the default argument is for the unix EPOCH in UTC)
    
    # Changes:
    Document the third parameter to `date_bin` better
    
    * prettier
---
 docs/source/user-guide/sql/scalar_functions.md | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/docs/source/user-guide/sql/scalar_functions.md b/docs/source/user-guide/sql/scalar_functions.md
index c72ef94f42..50e1cbc3d6 100644
--- a/docs/source/user-guide/sql/scalar_functions.md
+++ b/docs/source/user-guide/sql/scalar_functions.md
@@ -1347,7 +1347,8 @@ date_bin(interval, expression, origin-timestamp)
 - **interval**: Bin interval.
 - **expression**: Time expression to operate on.
   Can be a constant, column, or function.
-- **timestamp**: Starting point used to determine bin boundaries.
+- **origin-timestamp**: Optional. Starting point used to determine bin boundaries. If not specified
+  defaults `1970-01-01T00:00:00Z` (the UNIX epoch in UTC).
 
 The following intervals are supported: