You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Timo Walther (JIRA)" <ji...@apache.org> on 2016/10/13 12:19:21 UTC
[jira] [Created] (CALCITE-1435) Wrong comparison of TIMESTAMP
literals
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:
{code}
TIMESTAMP '2011-01-01 00:00:00.001' >= TIMESTAMP '2011-01-01 00:00:00.005'
{code}
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
(v6.3.4#6332)