- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Impala - bug timestamp
- Labels:
-
Apache Impala
Created on ‎01-23-2015 12:58 AM - edited ‎09-16-2022 02:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
By doing these 2 queries I get the same result (1412640000):
select unix_timestamp('2014-10-07 00:00:00.209','yyyy-MM-dd HH:mm:ss.SSS') as date_event from myTable;
select unix_timestamp('2014-10-07 00:00:00.100','yyyy-MM-dd HH:mm:ss.SSS') as date_event from myTable;
However, by doing I get 1412640001
select unix_timestamp('2014-10-07 00:00:01.100','yyyy-MM-dd HH:mm:ss.SSS') as date_event from myTable; the timestamp changes well;
I have the feeling that the seconds are not taken into account,
My Impalad version is 2.1.0-cdh5 (build e48c2b48c53ea9601b8f47a39373aa83ff7ca6e2)
Thank you!
Created ‎01-23-2015 06:19 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Alina
Seconds are taken into unix times, not miliseconds.
So,
select unix_timestamp('2014-10-07 00:00:00.999','yyyy-MM-dd HH:mm:ss.SSS') = unix_timestamp('2014-10-07 00:00:00.100','yyyy-MM-dd HH:mm:ss.SSS')
Result: True
You can check it here
http://www.onlineconversion.com/unix_time.htm
FYI
Created ‎01-23-2015 06:19 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Alina
Seconds are taken into unix times, not miliseconds.
So,
select unix_timestamp('2014-10-07 00:00:00.999','yyyy-MM-dd HH:mm:ss.SSS') = unix_timestamp('2014-10-07 00:00:00.100','yyyy-MM-dd HH:mm:ss.SSS')
Result: True
You can check it here
http://www.onlineconversion.com/unix_time.htm
FYI
