Skip to content

Commit

Permalink
[hotfix] adapting to pydruid 0.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed May 24, 2016
1 parent eb3bfb5 commit dee4c34
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions caravel/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,7 @@ def recursive_get_fields(_conf):
if len(splitted) > 1:
for s in eq.split(','):
s = s.strip()
fields.append(Filter.build_filter(Dimension(col) == s))
fields.append(Dimension(col) == s)
cond = Filter(type="or", fields=fields)
else:
cond = Dimension(col) == eq
Expand All @@ -1175,8 +1175,8 @@ def recursive_get_fields(_conf):
cond = Filter(type="regex", pattern=eq, dimension=col)
if filters:
filters = Filter(type="and", fields=[
Filter.build_filter(cond),
Filter.build_filter(filters)
cond,
filters
])
else:
filters = cond
Expand Down Expand Up @@ -1213,11 +1213,11 @@ def recursive_get_fields(_conf):
for unused, row in df.iterrows():
fields = []
for dim in dims:
f = Filter.build_filter(Dimension(dim) == row[dim])
f = Dimension(dim) == row[dim]
fields.append(f)
if len(fields) > 1:
filt = Filter(type="and", fields=fields)
filters.append(Filter.build_filter(filt))
filters.append(filt)
elif fields:
filters.append(fields[0])

Expand All @@ -1227,8 +1227,8 @@ def recursive_get_fields(_conf):
qry['filter'] = ff
else:
qry['filter'] = Filter(type="and", fields=[
Filter.build_filter(ff),
Filter.build_filter(orig_filters)])
ff,
orig_filters])
qry['limit_spec'] = None
if row_limit:
qry['limit_spec'] = {
Expand Down

0 comments on commit dee4c34

Please sign in to comment.