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

Michael Mior commented on CALCITE-1436:
---------------------------------------

[~julianhyde] Thanks for keeping tabs on this. I should know better by know on 
both those points. Sorry for that. Agreed that tests should be added.

Fixed in 
[f84a3eb|https://github.com/apache/calcite/commit/f84a3eb330d4ac69dd412498398909a690e9ce2d]

> 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: Michael Mior
>            Priority: Major
>             Fix For: 1.17.0
>
>
> 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
(v7.6.3#76005)

Reply via email to