Skip to content

Commit

Permalink
Revert "Support more druid postaggregations. (apache#2235)"
Browse files Browse the repository at this point in the history
This reverts commit 3018356.
  • Loading branch information
alanna scott committed Feb 25, 2017
1 parent 8758296 commit 3ca19cc
Showing 1 changed file with 4 additions and 27 deletions.
31 changes: 4 additions & 27 deletions superset/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@
from pydruid.client import PyDruid
from pydruid.utils.aggregators import count
from pydruid.utils.filters import Dimension, Filter
from pydruid.utils.postaggregator import (
Postaggregator, Quantile, Quantiles, Field, Const, HyperUniqueCardinality,
)
from pydruid.utils.postaggregator import Postaggregator
from pydruid.utils.having import Aggregation
from six import string_types

Expand Down Expand Up @@ -2357,30 +2355,9 @@ def recursive_get_fields(_conf):
all_metrics += conf.get('fieldNames', [])
if conf.get('type') == 'javascript':
post_aggs[metric_name] = JavascriptPostAggregator(
name=conf.get('name', ''),
field_names=conf.get('fieldNames', []),
function=conf.get('function', ''))
elif conf.get('type') == 'quantile':
post_aggs[metric_name] = Quantile(
conf.get('name', ''),
conf.get('probability', ''),
)
elif conf.get('type') == 'quantiles':
post_aggs[metric_name] = Quantiles(
conf.get('name', ''),
conf.get('probabilities', ''),
)
elif conf.get('type') == 'fieldAccess':
post_aggs[metric_name] = Field(conf.get('name'), '')
elif conf.get('type') == 'constant':
post_aggs[metric_name] = Const(
conf.get('value'),
output_name=conf.get('name', '')
)
elif conf.get('type') == 'hyperUniqueCardinality':
post_aggs[metric_name] = HyperUniqueCardinality(
conf.get('name'), ''
)
name=conf.get('name'),
field_names=conf.get('fieldNames'),
function=conf.get('function'))
else:
post_aggs[metric_name] = Postaggregator(
conf.get('fn', "/"),
Expand Down

0 comments on commit 3ca19cc

Please sign in to comment.