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

Wrong comparison of TIMESTAMP literals

    XMLWordPrintableJSON

Details

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

    Description

      The following expression always returns true when using ProjectToCalcRule which is invalid:

      TIMESTAMP '2011-01-01 00:00:00.001' >= TIMESTAMP '2011-01-01 00:00:00.005'
      

      The reason for this is that a wrong RexProgram is built since RexUtil#makeKey returns the same key for both timestamps. Both timestamps, however, have the same digest (fractional seconds are missing).

      Attachments

        Activity

          People

            Unassigned Unassigned
            twalthr Timo Walther
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: