[
https://issues.apache.org/jira/browse/CALCITE-6751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mihai Budiu resolved CALCITE-6751.
----------------------------------
Fix Version/s: 1.39.0
Resolution: Fixed
Fixed in
[https://github.com/apache/calcite/commit/64cec27f1efb68a1f5d5fb1c3f224e9e71b3ff87]
Thank you for the reviews [~nobigo] [~zhehu]
> 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
> Labels: pull-request-available
> Fix For: 1.39.0
>
>
> 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)