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

Time string with signed TZH token preceded by dash cannot be cast to timestamp

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • Impala 3.3.0
    • Impala 3.4.0
    • Backend

    Description

      Given a time string containing a TZH token with a sign which is preceded immediately by a dash delimiter cannot be cast to timestamp.

      To reproduce

      Execute

      select cast("08:00-+01" as timestamp format "HH:MI-TZH");

      which results in NULL.

       


      It seems like the delimiter is incorrectly recognised as the sign of the timezone offset hour which prevents parsing the TZH value.
      Adding an additional delimiter (other than dash itself) between the dash separator and the sign in the time string makes cast working.

      Executing

      select cast("08:00- +01" as timestamp format "HH:MI-TZH");

      results in 08:00:00.

      Attachments

        Activity

          People

            rizaon Riza Suminto
            jozsef.koza Jozsef Koza
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: