You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Aleksey Plekhanov (Jira)" <ji...@apache.org> on 2021/08/02 15:15:00 UTC

[jira] [Assigned] (IGNITE-15002) Calcite engine. String functions fail on NULL constant

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

Aleksey Plekhanov reassigned IGNITE-15002:
------------------------------------------

    Assignee: Aleksey Plekhanov

> Calcite engine. String functions fail on NULL constant
> ------------------------------------------------------
>
>                 Key: IGNITE-15002
>                 URL: https://issues.apache.org/jira/browse/IGNITE-15002
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>            Reporter: Taras Ledkov
>            Assignee: Aleksey Plekhanov
>            Priority: Major
>
> The query
> {{select UPPER(NULL), LOWER(NULL)}}
> Functions:
> - UPPER
> - LOWER 
> - LEFT
> - RIGHT
> - REPEAT
> - REVERSE
> - SUBSTRING 
> fails with exception:
> {code}
> 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:323)
> 	at org.apache.calcite.linq4j.tree.Expressions.call(Expressions.java:445)
> 	at org.apache.calcite.linq4j.tree.Expressions.call(Expressions.java:457)
> 	at org.apache.ignite.internal.processors.query.calcite.exec.exp.ConverterUtils.convert(ConverterUtils.java:229)
> 	at org.apache.ignite.internal.processors.query.calcite.exec.exp.ConverterUtils.convert(ConverterUtils.java:175)
> 	at org.apache.ignite.internal.processors.query.calcite.exec.exp.RexImpTable$AbstractRexCallImplementor.genValueStatement(RexImpTable.java:1962)
> 	at org.apache.ignite.internal.processors.query.calcite.exec.exp.RexImpTable$AbstractRexCallImplementor.implement(RexImpTable.java:1909)
> 	at org.apache.ignite.internal.processors.query.calcite.exec.exp.RexToLixTranslator.visitCall(RexToLixTranslator.java:978)
> 	at org.apache.ignite.internal.processors.query.calcite.exec.exp.RexToLixTranslator.visitCall(RexToLixTranslator.java:78)
> 	at org.apache.calcite.rex.RexCall.accept(RexCall.java:174)
> 	at org.apache.ignite.internal.processors.query.calcite.exec.exp.RexToLixTranslator.visitLocalRef(RexToLixTranslator.java:873)
> 	at org.apache.ignite.internal.processors.query.calcite.exec.exp.RexToLixTranslator.visitLocalRef(RexToLixTranslator.java:78)
> 	at org.apache.calcite.rex.RexLocalRef.accept(RexLocalRef.java:75)
> 	at org.apache.ignite.internal.processors.query.calcite.exec.exp.RexToLixTranslator.translate(RexToLixTranslator.java:204)
> 	at org.apache.ignite.internal.processors.query.calcite.exec.exp.RexToLixTranslator.translate(RexToLixTranslator.java:197)
> 	at org.apache.ignite.internal.processors.query.calcite.exec.exp.RexToLixTranslator.translateList(RexToLixTranslator.java:750)
> 	at org.apache.ignite.internal.processors.query.calcite.exec.exp.RexToLixTranslator.translateProjects(RexToLixTranslator.java:178)
> 	at org.apache.ignite.internal.processors.query.calcite.exec.exp.ExpressionFactoryImpl.compile(ExpressionFactoryImpl.java:300)
> 	at org.apache.ignite.internal.processors.query.calcite.exec.exp.ExpressionFactoryImpl.lambda$scalar$4(ExpressionFactoryImpl.java:263)
> 	at java.base/java.util.concurrent.ConcurrentMap.computeIfAbsent(ConcurrentMap.java:330)
> 	at org.apache.ignite.internal.processors.query.calcite.exec.exp.ExpressionFactoryImpl.scalar(ExpressionFactoryImpl.java:263)
> 	at org.apache.ignite.internal.processors.query.calcite.exec.exp.ExpressionFactoryImpl.project(ExpressionFactoryImpl.java:220)
> 	at org.apache.ignite.internal.processors.query.calcite.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:202)
> 	at org.apache.ignite.internal.processors.query.calcite.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:109)
> 	at org.apache.ignite.internal.processors.query.calcite.rel.IgniteProject.accept(IgniteProject.java:89)
> 	at org.apache.ignite.internal.processors.query.calcite.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:657)
> 	at org.apache.ignite.internal.processors.query.calcite.exec.LogicalRelImplementor.go(LogicalRelImplementor.java:672)
> 	at org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.executeQuery(ExecutionServiceImpl.java:717)
> 	at org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.executePlan(ExecutionServiceImpl.java:657)
> 	at org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.executePlans(ExecutionServiceImpl.java:410)
> 	at org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.executeQuery(ExecutionServiceImpl.java:392)
> 	at org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.query(CalciteQueryProcessor.java:258)
> 	at org.apache.ignite.internal.processors.query.calcite.logical.SqlScriptRunner.sql(SqlScriptRunner.java:111)
> 	at org.apache.ignite.internal.processors.query.calcite.logical.SqlScriptRunner$Query.execute(SqlScriptRunner.java:512)
> 	at org.apache.ignite.internal.processors.query.calcite.logical.SqlScriptRunner.run(SqlScriptRunner.java:93)
> 	at org.apache.ignite.internal.processors.query.calcite.logical.ScriptTestRunner$1.run(ScriptTestRunner.java:219)
> 	at java.base/java.lang.Thread.run(Thread.java:834)
> Caused by: java.lang.NoSuchMethodException: java.lang.Void.valueOf(java.lang.String)
> 	at java.base/java.lang.Class.getMethod(Class.java:2109)
> 	at org.apache.calcite.linq4j.tree.Types.lookupMethod(Types.java:314)
> 	... 36 more
> {code}
> The function SUBSTRING fails on NULL constant as the {{from}}  and the {{for}} arguments.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)