You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If any of the two arguments is `null` or an empty string `null` is returned.
568
564
569
565
[NOTE]
570
566
If the parsing pattern contains only date units (e.g. 'dd/MM/yyyy') an error is returned
@@ -612,9 +608,9 @@ DATE_PART(
612
608
613
609
*Output*: integer
614
610
615
-
*Description*: Extract the specified unit from a date/datetime. If any of the two arguments is `null` a `null` is returned.
616
-
It's similar to <<sql-functions-datetime-extract>> but with different names and aliases for the units and
617
-
provides more options (e.g.: `TZOFFSET`).
611
+
*Description*: Extract the specified unit from a date/datetime. It's similar to
612
+
<<sql-functions-datetime-extract>> but with different names and aliases for the
613
+
units and provides more options (e.g.: `TZOFFSET`).
618
614
619
615
[cols="^,^"]
620
616
|===
@@ -701,9 +697,11 @@ should be truncated to. If `null`, the function returns `null`.
701
697
702
698
*Output*: datetime/interval
703
699
704
-
*Description*: Truncate the date/datetime/interval to the specified unit by setting all fields that are less significant than the specified
705
-
one to zero (or one, for day, day of week and month). If any of the two arguments is `null` a `null` is returned.
706
-
If the first argument is `week` and the second argument is of `interval` type, an error is thrown since the `interval` data type doesn't support a `week` time unit.
700
+
*Description*: Truncate the date/datetime/interval to the specified unit by
701
+
setting all fields that are less significant than the specified one to zero (or
702
+
one, for day, day of week and month). If the first argument is `week` and the
703
+
second argument is of `interval` type, an error is thrown since the `interval`
704
+
data type doesn't support a `week` time unit.
707
705
708
706
[cols="^,^"]
709
707
|===
@@ -789,10 +787,10 @@ FORMAT(
789
787
*Output*: string
790
788
791
789
*Description*: Returns the date/datetime/time as a string using the
792
-
https://docs.microsoft.com/en-us/sql/t-sql/functions/format-transact-sql#arguments[format] specified in the 2nd argument. The formatting
793
-
pattern used is the one from
794
-
https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings[Microsoft SQL Server Format Specification].
795
-
If any of the two arguments is `null` or the pattern is an empty string `null` is returned.
The histogram in SQL does *NOT* return empty buckets for missing intervals as the traditional <<search-aggregations-bucket-histogram-aggregation, histogram>> and <<search-aggregations-bucket-datehistogram-aggregation, date histogram>>. Such behavior does not fit conceptually in SQL which treats all missing values as `NULL`; as such the histogram places all missing values in the `NULL` group.
46
+
The histogram in SQL does *NOT* return empty buckets for missing intervals as the traditional <<search-aggregations-bucket-histogram-aggregation, histogram>> and <<search-aggregations-bucket-datehistogram-aggregation, date histogram>>. Such behavior does not fit conceptually in SQL which treats all missing values as `null`; as such the histogram places all missing values in the `null` group.
47
47
48
48
`Histogram` can be applied on either numeric fields:
0 commit comments