druid-io / pydruid

A Python connector for Druid
Other
507 stars 198 forks source link

Added support for filtered aggregator #28

Closed se7entyse7en closed 8 years ago

se7entyse7en commented 8 years ago

Adds support for filtered aggregator. Usage example:

agg = filtered(Filter(dimension='label', value='impression'), count('count'))
query.groupby(datasource="kafka", granularity="minute", intervals="2015-09-01T00:00:00.000/2015-09-30T00:00:00.000", aggregations={'impressions': agg, 'evs': count('events')})
se7entyse7en commented 8 years ago

Addresses issue #27.

se7entyse7en commented 8 years ago

I updated the pull-request by adding some tests for the filtered aggregator. This branch is rebased on pull-request #32, so this should be done after that. I made two different pull-request so that it is possible to see that no previous behaviour is broken.

se7entyse7en commented 8 years ago

Can someone please have a look on this?

se7entyse7en commented 8 years ago

Rebased on master and fixed test.

xvrl commented 8 years ago

Thanks @se7entyse7en, do you mind signing our CLA before I can merge this? You can do so here http://druid.io/community/cla.html – it also applies to metamx/pydruid

se7entyse7en commented 8 years ago

@xvrl ok! done!