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

Babel should accept CURRENT_DATE and CURRENT_DATETIME, with and without parentheses

    XMLWordPrintableJSON

Details

    Description

      The following BigQuery SQL contains CURRENT_DATE and CURRENT_DATETIME without parentheses. Babel parser should accept it. (It should also accept CURRENT_TIME and CURRENT_TIMESTAMP with parentheses.)

       

      The following SQL should trigger CalciteContextException: No match found for function signature CURRENT_TIMESTAMP() for the date functions, or if you add parens to the current_time.

       

      WITH THE_TIMES_ARE_STATIC AS
      (SELECT
          CURRENT_DATE as a_date,
          CURRENT_DATETIME() as a_datetime,
          CURRENT_TIME as a_time,
          CURRENT_TIMESTAMP() as a_timestamp
      )
      SELECT * FROM THE_TIMES_ARE_STATIC 
      

      Attachments

        Issue Links

          Activity

            People

              danny0405 Danny Chen
              jswett Justin Swett
              Votes:
              0 Vote for this issue
              Watchers:
              4 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 - 10m
                  10m