Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-3252

Add CONVERT_TIMEZONE, TO_DATE, TO_TIMESTAMP functions to Redshift operator library

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.21.0
    • Component/s: None

      Description

      Syntax error while parsing CONVERT_TIMEZONE, TO_DATE, TO_TIMESTAMP functions on Redshift. Example queries that error for these functions:

      SELECT CONVERT_TIMEZONE('UTC', 'America/Los_Angeles', CAST('2019-01-01 01:00:00' AS TIMESTAMP) FROM mytable 
      SELECT TO_DATE('2019-01-01', 'YYYY-MM-DD') FROM mytable 
      SELECT TO_TIMESTAMP('2019-01-01 01:00:00', 'YYYY-MM-DD HH:MM:SS') FROM mytable 
      

      With errors like:

      No match found for function signature CONVERT_TIMEZONE(<CHARACTER>, <CHARACTER>, <TIMESTAMP>)
      

      These are valid in Redshift and Postgres, except for CONVERT_TIMEZONE, which I believe is only valid on Redshift.

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                lindseycat Lindsey Meyer
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 20m
                  1h 20m