You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Alessandro Solimando (Jira)" <ji...@apache.org> on 2023/08/02 16:25:00 UTC

[jira] [Resolved] (CALCITE-5859) Compile-time evaluation of LEFT(NULL, n) should not throw RuntimeException

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

Alessandro Solimando resolved CALCITE-5859.
-------------------------------------------
    Resolution: Fixed

Merged via [{{7098677}}|https://github.com/apache/calcite/commit/70986773b80f1941a979c793c4c385dffb2da7cd], thanks [~mbudiu] for your contribution, and [~Chunwei Lei] for the review!

> Compile-time evaluation of LEFT(NULL, n) should not throw RuntimeException
> --------------------------------------------------------------------------
>
>                 Key: CALCITE-5859
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5859
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.34.0, 1.35.0
>            Reporter: Mihai Budiu
>            Assignee: Mihai Budiu
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.36.0
>
>
> {code:sql}
> SELECT LEFT(NULL, 100)
> {code}
> causes this exception:
> {code}
> Caused by: java.lang.RuntimeException: while resolving method 'valueOf[class java.lang.String]' in class class java.lang.Void
> 	at org.apache.calcite.linq4j.tree.Types.lookupMethod(Types.java:318)
> 	at org.apache.calcite.linq4j.tree.Expressions.call(Expressions.java:449)
> 	at org.apache.calcite.linq4j.tree.Expressions.call(Expressions.java:461)
> 	at org.apache.calcite.adapter.enumerable.EnumUtils.convert(EnumUtils.java:396)
> 	at org.apache.calcite.adapter.enumerable.EnumUtils.convert(EnumUtils.java:339)
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)