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

Python driver count function filter param is counterintuitive #1992

Closed
radev opened this issue Feb 22, 2014 · 1 comment · Fixed by #1995
Closed

Python driver count function filter param is counterintuitive #1992

radev opened this issue Feb 22, 2014 · 1 comment · Fixed by #1995
Assignees
Milestone

Comments

@radev
Copy link
Contributor

radev commented Feb 22, 2014

When I run following query:

r.table('users').count(r.row['email'] != 'test').run()

I expect it to behave the same as:

r.table('users').filter(r.row['email'] != 'test').count().run()

But it's not, as inside count function filter == () condition evaluates to true (non emtpy eq query) and count runs without filter.

This works fine:

r.table.count(lambda user: user['email'] != 'test).run()
@mlucy mlucy added this to the 1.12 milestone Feb 22, 2014
@mlucy
Copy link
Member

mlucy commented Feb 22, 2014

Thanks for reporting this! We're probably missing a func_wrap somewhere in the Python driver. Assigning to @Tryneus .

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 a pull request may close this issue.

3 participants