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

AssertionError extracting value from an INTERVAL literal

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.5.0
    • core
    • None

    Description

      CAST(...) * (INTERVAL constant) results into Internal Error.

      For example,

      select cast(empno as Integer) * (INTERVAL '1' DAY)
      from emp
      

      results into

      java.lang.AssertionError: Internal error: invalid literal: INTERVAL '1' DAY
      

      The reason is that INTERVAL constant is not extracted properly in the cases where this constant times a CAST() function

      Attachments

        Issue Links

          Activity

            People

              seanhychu Sean Hsuan-Yi Chu
              seanhychu Sean Hsuan-Yi Chu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: