You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2015/10/24 04:38:27 UTC

[jira] [Resolved] (CALCITE-922) CAST(...) * (INTERVAL constant) results into Internal Error

     [ https://issues.apache.org/jira/browse/CALCITE-922?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julian Hyde resolved CALCITE-922.
---------------------------------
       Resolution: Fixed
    Fix Version/s: 1.5.0

Fixed in http://git-wip-us.apache.org/repos/asf/incubator-calcite/commit/c5f2599f. Thanks for the patch, [~seanhychu]!

> CAST(...) * (INTERVAL constant) results into Internal Error 
> ------------------------------------------------------------
>
>                 Key: CALCITE-922
>                 URL: https://issues.apache.org/jira/browse/CALCITE-922
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: Sean Hsuan-Yi Chu
>            Assignee: Sean Hsuan-Yi Chu
>             Fix For: 1.5.0
>
>
> For example,
> {code}
> select cast(empno as Integer) * (INTERVAL '1' DAY)
> from emp
> {code}
> results into 
> {code}
> java.lang.AssertionError: Internal error: invalid literal: INTERVAL '1' DAY
> {code}
> The reason is that INTERVAL constant is not extracted properly in the cases where this constant times a CAST() function 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)