Timo Walther created CALCITE-1435:

             Summary: Wrong comparison of TIMESTAMP literals
                 Key: CALCITE-1435
                 URL: https://issues.apache.org/jira/browse/CALCITE-1435
             Project: Calcite
          Issue Type: Bug
          Components: core
            Reporter: Timo Walther
            Assignee: Julian Hyde

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).

This message was sent by Atlassian JIRA

Reply via email to