Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-2190

Complete conversion functions between timestamp, unixtime/epoch, and string dates

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Impala 2.2
    • Impala 2.3.0
    • 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

          Activity

            People

              acalfa_impala_b6e0 Andre Calfa
              justin@cloudera.com Justin Erickson
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: