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

Reduction of CAST from string to interval is incorrect

    XMLWordPrintableJSON

Details

    Description

      Consider the following SQL expression:

      SELECT CAST('1' AS INTERVAL HOURS)
      

      RexSimplify.simplifyCast reduces this to a RelLiteral with value 1 and type INTERVAL HOURS. However, the representation of short intervals should use the canonical value of the interval in milliseconds, so the correct value should be 3600000.

      Attachments

        Issue Links

          Activity

            People

              mbudiu Mihai Budiu
              mbudiu Mihai Budiu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: