Gian Merlino commented on CALCITE-1436:

Yep, you're right, this and CALCITE-1404 were both things I ran into while 
looking into Druid SQL stuff. Specifically there are two areas that the 
interpreter seemed useful:

1) unit tests of the Druid pushdown stuff; I wanted to be able to do a 
cross-engine test with Druid vs some other engine handling the same SQL. I was 
looking at Calcite's interpreter as the "some other engine".

2) in production, handling of bits of the SQL query that can't be pushed down 
to Druid. I'm still not sure if this is a good idea or not, maybe it's better 
to just fail fast if we can't push down 100% of the query. Trying to "fill in 
the gaps" can surprise users by executing a plan that is so inefficient that 
it's doomed to fail. But if we end up wanting to do this regardless of that 
risk, then Calcite's interpreter seems useful for that.

> 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

Reply via email to