[ 
https://issues.apache.org/jira/browse/CALCITE-1436?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15573071#comment-15573071
 ] 

Julian Hyde commented on CALCITE-1436:
--------------------------------------

I'm not surprised by this. AggregateNode has not been extensively tested.

I surmise that you're looking at various options for Druid-SQL. We should 
discuss. EnumerableAggregate is more thoroughly tested, and more efficient 
(since it is compiled, not interpreted). AggregateNode (and the other 
interpreter operators) could potentially be much more efficient than 
EnumerableAggregate, if we made them take a batch of rows (say in Arrow 
format). But by that point we would have an execution engine similar to Drill. 
Pulling the engine out of Drill should also be considered.

> AggregateNode NPE for aggregators other than SUM/COUNT
> ------------------------------------------------------
>
>                 Key: CALCITE-1436
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1436
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: Gian Merlino
>            Assignee: Julian Hyde
>
> AggregateNode.getAccumulator does this for any aggregation other than COUNT 
> or SUM:
>       final AggImpState agg = new AggImpState(0, call, false);
>       int stateSize = agg.state.size();
> This NPEs because "state" is null on freshly created AggImpState instances.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to