Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.36.0
Description
The following RelOptRulesTest
@Test void testArrayConcat() { final String sql = "select array_concat(ARRAY [1, 2], ARRAY [3, 4])"; sql(sql).withFactory( t -> t.withOperatorTable( opTab -> SqlLibraryOperatorTableFactory.INSTANCE.getOperatorTable( SqlLibrary.STANDARD, SqlLibrary.BIG_QUERY))) .withRule(CoreRules.PROJECT_REDUCE_EXPRESSIONS) .check(); }
crashes with the following stack trace:
java.lang.RuntimeException: While compiling [ARRAY_CONCAT(ARRAY(1, 2), ARRAY(3, 4))] at org.apache.calcite.rex.RexExecutable.compile(RexExecutable.java:73) at org.apache.calcite.rex.RexExecutable.<init>(RexExecutable.java:53) at org.apache.calcite.rex.RexExecutorImpl.reduce(RexExecutorImpl.java:145) at org.apache.calcite.rel.rules.ReduceExpressionsRule.reduceExpressionsInternal(ReduceExpressionsRule.java:774) at org.apache.calcite.rel.rules.ReduceExpressionsRule.reduceExpressions(ReduceExpressionsRule.java:714)
It seems that the generated code passed to Janino is invalid:
Line 10, Column 5: Assignment conversion not possible from type "java.util.ArrayList" to type "java.lang.Object[]"
org.codehaus.commons.compiler.CompileException: Line 10, Column 5: Assignment conversion not possible from type "java.util.ArrayList" to type "java.lang.Object[]"
Attachments
Issue Links
- links to