Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Cannot Reproduce
-
Impala 2.3.0
-
None
Description
Running timestamp tests, I hit the following bug where a typo in a timestamp string produced a strange result without complaining that the input value was invalid:
Query: select to_utc_timestamp('2015-10-13-09:15:34.101', 'PDT') Oops. -----------------------------------^ +----------------------------------------------------+ | to_utc_timestamp('2015-10-13-09:15:34.101', 'pdt') | +----------------------------------------------------+ | 2015-10-13 07:00:00 | // ??? +----------------------------------------------------+ Query: select to_utc_timestamp('2015-10-13 09:15:34.101', 'PDT') +----------------------------------------------------+ | to_utc_timestamp('2015-10-13 09:15:34.101', 'pdt') | +----------------------------------------------------+ | 2015-10-13 16:15:34.101000000 | // MUCH BETTER +----------------------------------------------------+
It looks like anything after the bad character is ignored:
Query: select to_utc_timestamp('2015-10-13-09:15:34.101', 'UTC') +----------------------------------------------------+ | to_utc_timestamp('2015-10-13-09:15:34.101', 'utc') | +----------------------------------------------------+ | 2015-10-13 00:00:00 | +----------------------------------------------------+