druid-io / pydruid

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

add support for `and`,`or` filters with more than 2 values. #46

Closed dakra closed 8 years ago

dakra commented 8 years ago

allows filters like filter = Filter(type='or', [Dimension('dim1') == v for v in list_of_values])

xvrl commented 8 years ago

:+1:

dakra commented 8 years ago

Ah, didn't see the issue or the pull request. I updated my pull request to correctly handle #42

fjy commented 8 years ago

@dakra can you fill out CLA if you haven't done it already? http://druid.io/community/cla.html

dakra commented 8 years ago

:+1: done

mcorbe commented 8 years ago

@dakra: Forgot to mention that x needs to be tested as well as self in and / or (#42)

dakra commented 8 years ago

and or or are left associative so if the left filter (=self) is an and filter already and I and it again with any other filter I just add the right filter to the left filter fields.

maybe I'm missing something obvious or you meant something else?!

mcorbe commented 8 years ago

@dakra sorry my bad, disregard my comment. was only relevant with pull #42.