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

Cast to interval is ignored

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.21.0
    • None
    • core

    Description

      when adding day to timestamp, the day interval is not converted to ms, in the generated code I see "-2208944806000L + 2L;" where 2 is the number of days. same for hour/minute/second. the return value is the original timestamp (at least when represented as a string, perhaps the two ms are added to it)

      the query I was using is more like timestamp '2014-02-11 00:00:00' + cast('1' as interval day) (I have a custom convertlet creating this expression). the CAST here is creating an interval value, but we expect it to be processed as in SqlToRexNodeConverterImpl (which turns it into milliseconds)

      Attachments

        Activity

          People

            Unassigned Unassigned
            jbalint@gmail.com Jess Balint
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: