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

Support for alternative Interval syntax

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • core
    • None

    Description

      spark.sql("select (CURRENT_DATE - INTERVAL '7 DAYS') ").show
      +-----------------------------------------------------------------------+
      |date_add(current_date(), (- extractansiintervaldays(INTERVAL '7' DAY)))|
      +-----------------------------------------------------------------------+
      |                                                             2023-06-06|
      +-----------------------------------------------------------------------+ 

      currently the parser does not allows:

      INTERVAL '7 DAYS' 

      it only accepts:

      INTERVAL '7' DAYS 

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              MasseGuillaume Guillaume Massé
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: