druid icon indicating copy to clipboard operation
druid copied to clipboard

feature to remove some aggregation from being included in response from broker

Open himanshug opened this issue 12 years ago • 5 comments

Sometimes we add aggregations to a query just because they are needed in a post-aggregation. On getting the response, we completely disregard the those aggregations and only use post-aggregations.

Currently, Is there any way to tell druid broker not to include some aggregations in the response?

Basically, I am looking for a feature where we could specify something at per aggregation basis like following...

"aggregations": [ { "type": "longSum", "name": "sample_name1", "fieldName": "sample_fieldName1" , "includeInResponse":"false"}, { "type": "doubleSum", "name": "sample_name2", "fieldName": "sample_fieldName2" } ],

and the aggregation "sample_name1" is not included in the response.

himanshug avatar Aug 18 '14 13:08 himanshug

I guess, One way to implement this could be to add desired attribute("includeInResponse" for lack of a better name for now) in all the implementations of AggregatorFactory . And, modify FinalizeResultsQueryRunner to remove those aggregations from the final result sequence.

himanshug avatar Aug 18 '14 13:08 himanshug

I believe this is the same issue as #95. I agree with adding a new field to the aggregator factories that prevent results from returning. The Result Builder objects will also need to be updated.

fjy avatar Aug 18 '14 17:08 fjy

Closing this for duplication.

fjy avatar Jun 07 '15 18:06 fjy

Hello Team! Could any body confirm if this issue is resolved , and if yes then what is the solution

reemasaluja avatar Jul 24 '19 15:07 reemasaluja

This is effectively solved by DruidSQL where you can select which columns you want back

vogievetsky avatar Jul 24 '19 16:07 vogievetsky