From a4a94291268f5d9cab094618bb1dffa6bba9b290 Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Sat, 20 Jan 2024 05:34:52 -0500 Subject: [PATCH] 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 c72ef94f42ea..50e1cbc3d622 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: