Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support javascript filter #38

Merged
merged 2 commits into from
Jan 21, 2016
Merged

support javascript filter #38

merged 2 commits into from
Jan 21, 2016

Conversation

nmckoy
Copy link
Contributor

@nmckoy nmckoy commented Dec 31, 2015

Hey!

Started using pydruid for some export functionality i needed for some queries. needed to get a little more specific with JS filters and noticed there wasn't support for it. I plopped some code in and it works great locally so i decided to PR my change for review.

This would be syntax for python query:

filter=JavaScript('dim1') == 'function(x){return true}'

Let me know if this syntax could improve.

Thanks!

@fjy
Copy link
Member

fjy commented Dec 31, 2015

@nmckoy I'm +1 on the syntax

@xvrl @gianm thoughts?

@fjy
Copy link
Member

fjy commented Jan 7, 2016

@nmckoy do you mind signing the CLA here? druid.io/community/cla.html

@nmckoy
Copy link
Contributor Author

nmckoy commented Jan 8, 2016

@fjy just signed!

@@ -67,3 +72,10 @@ def __init__(self, dim):

def __eq__(self, other):
return Filter(dimension=self.dimension, value=other)

class Javascript:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor nit, in the main Druid repo we typically use JavaScript instead of Javascript in class names

@fjy
Copy link
Member

fjy commented Jan 21, 2016

👍

@xvrl can we get this in???

@xvrl
Copy link
Member

xvrl commented Jan 21, 2016

👍

xvrl added a commit that referenced this pull request Jan 21, 2016
support javascript filter
@xvrl xvrl merged commit cc15aab into druid-io:master Jan 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants