mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-25 23:57:20 -04:00
SQL: Fix FORMAT function to better comply with Microsoft SQL Server specification (#86225)
This commit is contained in:
parent
fd99a502ee
commit
f69c7396d9
8 changed files with 303 additions and 41 deletions
|
@ -454,7 +454,7 @@ include-tagged::{sql-specs}/docs/docs.csv-spec[dateParse1]
|
|||
|
||||
[NOTE]
|
||||
====
|
||||
The resulting `date` will have the time zone specified by the user through the
|
||||
The resulting `date` will have the time zone specified by the user through the
|
||||
<<sql-search-api-time-zone,`time_zone`>>/<<jdbc-cfg-timezone,`timezone`>> REST/driver parameters
|
||||
with no conversion applied.
|
||||
|
||||
|
@ -810,7 +810,7 @@ SQL Server Format Specification].
|
|||
|
||||
[NOTE]
|
||||
If the 1st argument is of type `time`, then pattern specified by the 2nd argument cannot contain date related units
|
||||
(e.g. 'dd', 'MM', 'YYYY', etc.). If it contains such units an error is returned. +
|
||||
(e.g. 'dd', 'MM', 'yyyy', etc.). If it contains such units an error is returned. +
|
||||
Format specifier `F` will be working similar to format specifier `f`.
|
||||
It will return the fractional part of seconds, and the number of digits will be same as of the number of `Fs` provided as input (up to 9 digits).
|
||||
Result will contain `0` appended in the end to match with number of `F` provided.
|
||||
|
@ -862,9 +862,9 @@ Patterns for Date/Time Formatting].
|
|||
If the 1st argument is of type `time`, then the pattern specified by the 2nd argument cannot contain date related units
|
||||
(e.g. 'dd', 'MM', 'YYYY', etc.). If it contains such units an error is returned. +
|
||||
The result of the patterns `TZ` and `tz` (time zone abbreviations) in some cases differ from the results returned by the `TO_CHAR`
|
||||
in PostgreSQL. The reason is that the time zone abbreviations specified by the JDK are different from the ones specified by PostgreSQL.
|
||||
This function might show an actual time zone abbreviation instead of the generic `LMT` or empty string or offset returned by the PostgreSQL
|
||||
implementation. The summer/daylight markers might also differ between the two implementations (e.g. will show `HT` instead of `HST`
|
||||
in PostgreSQL. The reason is that the time zone abbreviations specified by the JDK are different from the ones specified by PostgreSQL.
|
||||
This function might show an actual time zone abbreviation instead of the generic `LMT` or empty string or offset returned by the PostgreSQL
|
||||
implementation. The summer/daylight markers might also differ between the two implementations (e.g. will show `HT` instead of `HST`
|
||||
for Hawaii). +
|
||||
The `FX`, `TM`, `SP` pattern modifiers are not supported and will show up as `FX`, `TM`, `SP` literals in the output.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue