Custom aggregator and dimensions access


While implementing a custom aggregator, we realized that in groupBy query types (druid-0.7.2):

  • BufferAggregator has access to any dimension column (via columnSelectorFactory.makeObjectColumnSelector)
  • while only does Aggregator have access if the dimension we want access to is specifed in the “dimensions” parameter of the query
    We resolve the issue by adding the desired dimension in the dimensions parameter, and re-aggregating on top (using dataSource.type: “query”).

But in an ideal world, we wish to have access to the dimension in the aggregator without having to group on it.


Do you confirm that the expected behaviour is the BufferAggregator’s ?
If yes, what could be expected it terms of timeline, to have the Aggregator interface removed, or a consistent bahaviour in both interfaces ?

Best regards,

Jerome Viveret

Software Developer


Hi Jérôme, I have to look over the code again, but I thought the aggregators and bufferaggregators had consistent access to columns. If not, we should probably file this issue. Can you provide a little bit more background on your use case? Perhaps we can think of alternative ways to solve your problem.