Mihai Budiu created CALCITE-6751:
------------------------------------
Summary: Reduction of CAST from string to interval is incorrect
Key: CALCITE-6751
URL: https://issues.apache.org/jira/browse/CALCITE-6751
Project: Calcite
Issue Type: Bug
Components: core
Affects Versions: 1.38.0
Reporter: Mihai Budiu
Consider the following SQL expression:
{code:sql}
SELECT CAST('1' AS INTERVAL HOURS)
{code}
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.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)