-
Notifications
You must be signed in to change notification settings - Fork 590
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
ENH: Clean up window translation logic in pyspark backend #2004
ENH: Clean up window translation logic in pyspark backend #2004
Conversation
|
cc @hjoo @toryhaavik |
9c61c8f
to
259a801
Compare
259a801
to
8e2790b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@icexelloss thanks for working on that!
As we are using docstring with numpy format, could you provide these docstrings?
I hope in a near feature CI will do the docstring checks :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice cleaning @icexelloss
| @@ -1040,12 +1013,12 @@ def compile_lead(t, expr, scope, *, window, **kwargs): | |||
|
|
|||
| @compiles(ops.MinRank) | |||
| def compile_rank(t, expr, scope, *, window, **kwargs): | |||
| return F.rank().over(window).astype('long') - F.lit(1) | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for my own edification, what does F.lit(1) do in pyspark?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
F.lit(1) creates a constant literal column of "1"s
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. @icexelloss thanks for working on that.
related to my comments for docstring, no worry about that now.
I am working now to fix that.
|
Thanks @xmnlab! |
There are some code duplication in the current pyspark compiler. I cleaned up a bit.