gianm commented on issue #10072: URL: https://github.com/apache/druid/issues/10072#issuecomment-652548762
Hi @damnMeddlingKid, Looks like this is a bug and you got the right fix. The logic is similar to what's in CountSqlAggregator already, so I'd suggest extracting it to a helper function, for example, `CountAggregatorFactory.createFieldCountAggregatorFactory(PlannerContext, RowSignature, VirtualColumnRegistry, RexBuilder, RexNode)`. Then we could call that helper in AvgSqlAggregator as well. It would be similar to how it already calls out to `SumSqlAggregator.createSumAggregatorFactory`. If you raised a PR doing this it would be appreciated! Please feel free to add me as a reviewer on it or at-mention me in a comment. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org For additional commands, e-mail: commits-h...@druid.apache.org