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

BUG: Fix preceding and following with None #1765

Merged
merged 2 commits into from
Apr 22, 2019

Conversation

cpcloud
Copy link
Member

@cpcloud cpcloud commented Apr 22, 2019

Before this PR, calls like

ibis.window(preceding=(None, 1))  # ROWS BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING
ibis.window(following=(1, None))  # ROWS BETWEEN 1 FOLLOWING AND UNBOUNDED FOLLOWING

would fail because of incorrect usage of comparison operators, comparing
None to another value that is not None raising a TypeError.

This PR addresses the problem.

@cpcloud cpcloud added this to the Next Feature Release milestone Apr 22, 2019
@cpcloud cpcloud added bigquery bug Incorrect behavior inside of ibis impala The Apache Impala backend labels Apr 22, 2019
ibis/expr/window.py Outdated Show resolved Hide resolved
ibis/expr/window.py Outdated Show resolved Hide resolved
@cpcloud
Copy link
Member Author

cpcloud commented Apr 22, 2019

Thanks for the review @ash32 I ended up doing it slightly different, but the end result was the same (checking the value of start/end regardless of whether its counterpart was None).

@cpcloud cpcloud merged commit 1e39a5f into ibis-project:master Apr 22, 2019
@cpcloud cpcloud deleted the fix-prec-foll-unbounded branch April 22, 2019 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Incorrect behavior inside of ibis impala The Apache Impala backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants