Skip to content

Commit

Permalink
fix the definition of EXTRACT(SECOND...) which should return a floati…
Browse files Browse the repository at this point in the history
…ng point value

truncating fractional seconds isn't a good idea
  • Loading branch information
gavinking authored and lukasj committed Feb 1, 2022
1 parent 4c58381 commit 784ca2c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion spec/src/main/asciidoc/ch04-query-language.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1807,7 +1807,12 @@ value:
- DAY means the calendar day of the month, numbered from 1.
- HOUR means the hour of the day in 24-hour time, numbered from 0 to 23.
- MINUTE means the minute of the hour, numbered from 0 to 59.
- SECOND means the second of the minute, numbered from 0 to 59.

For the SECOND field type identifier, EXTRACT returns a floating point
value:

- SECOND means the second of the minute, numbered from 0 to 59, including
a fractional part representing fractions of a second.

It is illegal to pass a datetime argument which does not have the given
field type to EXTRACT.
Expand Down

0 comments on commit 784ca2c

Please sign in to comment.