Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
In CALCITE-4334 we added LITERAL_AGG, an internal aggregate function that returns a constant, but we did not extend Interpreter to execute queries containing LITERAL_AGG. This change fixes that.
Without that change, Interpreter throws a NullPointerException during construction:
java.lang.NullPointerException: agg.state at java.base/java.util.Objects.requireNonNull(Objects.java:233) at org.apache.calcite.interpreter.AggregateNode.getAccumulator(AggregateNode.java:206) at org.apache.calcite.interpreter.AggregateNode.<init>(AggregateNode.java:95) at org.apache.calcite.interpreter.Nodes$CoreCompiler.visit(Nodes.java:54) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) at java.base/java.lang.reflect.Method.invoke(Method.java:577) at org.apache.calcite.util.ReflectUtil.invokeVisitorInternal(ReflectUtil.java:263) at org.apache.calcite.util.ReflectUtil.invokeVisitor(ReflectUtil.java:220) at org.apache.calcite.util.ReflectUtil$1.invokeVisitor(ReflectUtil.java:470) at org.apache.calcite.interpreter.Interpreter$CompilerImpl.visit(Interpreter.java:358) at org.apache.calcite.interpreter.Nodes$CoreCompiler.visit(Nodes.java:48) at org.apache.calcite.interpreter.Interpreter$CompilerImpl.visitRoot(Interpreter.java:312) at org.apache.calcite.interpreter.Interpreter.<init>(Interpreter.java:88)
Attachments
Issue Links
- relates to
-
CALCITE-4334 LITERAL_AGG, an aggregate function that returns a constant value
- Closed