Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
Currently SqlTimestampAddFunction#deduceType does not deal with timestamp_ltz type correctly. Return type of timestampadd(..., ..., timestamp_ltz) will be timestamp but it should be timestamp_ltz.
Same issue is for precision datetime_plus.
Also precision is lost.
A number of queries highlighting the issue
SELECT timestamp '2003-08-02 12:54:01' - INTERVAL '1.123' SECOND(1, 3); SELECT time '12:12:12' + INTERVAL '3.456' SECOND(1, 3); SELECT timestampadd(SQL_TSI_FRAC_SECOND, 2, timestamp with local time zone '2016-02-24 12:42:25.000');
Attachments
Issue Links
- causes
-
FLINK-22861 TIMESTAMPADD + timestamp_ltz type throws CodeGenException
- Closed
- is related to
-
CALCITE-5266 Increase precision of TIMESTAMP, INTERVAL types to microseconds, nanoseconds
- Open
- links to