[
https://issues.apache.org/jira/browse/CALCITE-6751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mihai Budiu reassigned CALCITE-6751:
------------------------------------
Assignee: Mihai Budiu
> 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
> Assignee: Mihai Budiu
> Priority: Minor
>
> 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)