Skip to content

Apache DataFusion SQL Query Engine

Update scalar functions doc for extract/datepart (#8682)

Jeffrey4dcfd7dd8115
diff --git a/docs/source/user-guide/sql/scalar_functions.md b/docs/source/user-guide/sql/scalar_functions.md
index ad4c6ed083..629a5f6ecb 100644
--- a/docs/source/user-guide/sql/scalar_functions.md
+++ b/docs/source/user-guide/sql/scalar_functions.md
@@ -1410,6 +1410,7 @@ date_part(part, expression)
The following date parts are supported:
- year
+ - quarter _(emits value in inclusive range [1, 4] based on which quartile of the year the date is in)_
- month
- week _(week of the year)_
- day _(day of the month)_
@@ -1421,6 +1422,7 @@ date_part(part, expression)
- nanosecond
- dow _(day of the week)_
- doy _(day of the year)_
+ - epoch _(seconds since Unix epoch)_
- **expression**: Time expression to operate on.
Can be a constant, column, or function.
@@ -1448,6 +1450,7 @@ extract(field FROM source)
The following date fields are supported:
- year
+ - quarter _(emits value in inclusive range [1, 4] based on which quartile of the year the date is in)_
- month
- week _(week of the year)_
- day _(day of the month)_
@@ -1459,6 +1462,7 @@ extract(field FROM source)
- nanosecond
- dow _(day of the week)_
- doy _(day of the year)_
+ - epoch _(seconds since Unix epoch)_
- **source**: Source time expression to operate on.
Can be a constant, column, or function.