Details
Description
The query
select UPPER(NULL), LOWER(NULL)
Functions:
- UPPER
- LOWER
- LEFT
- RIGHT
- REPEAT
- REVERSE
- SUBSTRING
fails with exception:
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
The function SUBSTRING fails on NULL constant as the from and the for arguments.
Attachments
Issue Links
- fixes
-
IGNITE-15111 Calcite bug. Function INITCAP fails for NULL argument
- Resolved
-
IGNITE-15112 Calcite bug. Function TRUNCATE fails for NULL argument
- Resolved
-
IGNITE-15066 Calcite. Function CONCAT and NULL arguments
- Resolved
- is part of
-
IGNITE-14535 Caclite SQL engine capabilities
- Open
- links to