Details
-
New Feature
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Impala 2.2
-
None
Description
Related to IMPALA-2173, we should complete the conversion functions to go between timestamp, strings, and epoch
For converting to timestamp let's add:
- to_timestamp (bigint unixtime) - supported by Vertica, PostgreSQL
- to_timestamp (string date, [string pattern]) - supported by Oracle, PostgreSQL, IBM, Vertica
We can model this after PostgreSQL which provides a superset of the functionality: http://www.postgresql.org/docs/8.1/static/functions-formatting.html
While other engines don't have this we should add the following for completeness:
- from_timestamp (timestamp date, [string pattern]) like from_unixtime except takes argument of timestamp instead of string for date
We already have conversion from unixtime to string and conversion to unixtime:
- from_unixtime (bigint unixtime[, string format])
- unix_timestamp (timestamp date) returns unixtime as bigint
- unix_timestamp (string date, [string pattern]) returns unixtime as bigint
Attachments
Issue Links
- is related to
-
IMPALA-8367 from_unixtime Bad date/time conversion format: u on NULL value
- Reopened
-
IMPALA-5312 Timestamp functions from IMPALA-2190 are not documented
- Closed