Skip to content

Commit

Permalink
Add JavaScript aggregator support (druid-io#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
sologoub authored and dakra committed May 21, 2016
1 parent c362861 commit 8b30ade
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pydruid/utils/aggregators.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ def filtered(filter, agg):
"filter": Filter.build_filter(filter),
"aggregator": agg}

def javascript(columns_list, fn_aggregate, fn_combine, fn_reset):
return {"type": "javascript",
"fieldNames": columns_list,
"fnAggregate":fn_aggregate,
"fnCombine":fn_combine,
"fnReset":fn_reset}

def build_aggregators(agg_input):
return [_build_aggregator(name, kwargs)
Expand Down

0 comments on commit 8b30ade

Please sign in to comment.