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

Forget to change qualifier when converting INVERVAL_YEAR literal

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • None
    • 1.11.0
    • core
    • None

    Description

      If I execute this SQL:

      SELECT date '2008-12-31' + INTERVAL '1' YEAR

      INTERVAL '1' YEAR is converted into INTERVAL '12' YEAR inside SqlNodeToRexConverterImpl.convertLiteral method, which forgets to change qualifier to MONTH.

      Besides INTERVAL_YEAR_MONTH, there maybe other SqlTypeFamily have the same problem.

      In addition, can we expose SqlNodeToRexConverter in SqlToRelConverter to let developer to plugin their own converter?

      Attachments

        Issue Links

          Activity

            People

              julianhyde Julian Hyde
              Baofeng Zhang Baofeng Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: