-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-40339][SPARK-40342][SPARK-40345][SPARK-40348][PS] Implement quantile in Rolling/RollingGroupby/Expanding/ExpandingGroupby #37836
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
Conversation
|
Consider test refactor change is huge, I just spilt it into a separate patch: #37835 |
HyukjinKwon
left a comment
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.
(Merged #37835)
|
cc @zhengruifeng @xinrong-meng @itholic FYI |
itholic
left a comment
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.
The comments below also applied to other functions.
Looks good otherwise.
python/pyspark/pandas/window.py
Outdated
| ----- | ||
| `quantile` in pandas-on-Spark are using distributed percentile approximation | ||
| algorithm unlike pandas, the result might different with pandas, also `interpolation` | ||
| parameters are not supported yet. |
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.
nit: "parameters are not supported yet" -> "parameter is not supported yet" ?
Also can we comment it as "TODO" above function definition ?
e.g.
# TODO: support `interpolation` parameter.
def quantile(self, quantile: float, accuracy: int = 10000) -> FrameLike:
...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.
parameter is not supported yet, will address!
Frankly, the interpolation almost impossible to support, because we are using distributed percentile approximation algorithm unlike pandas. So we might don't want to add the note.
|
Merged to master |
|
@Yikun I think we should also add |
|
@HyukjinKwon @zhengruifeng Thanks
Hmm, forgot again, I also noticed that
|
|
Opps, just made a followup at #37890. Actually |
|
@HyukjinKwon OK, thanks! |
that's true, when I check the missing function in https://issues.apache.org/jira/browse/SPARK-40327, it's quite confusing that there is no document and I need to manually check whether a function exists. |
What changes were proposed in this pull request?
Implement quantile in Rolling/RollingGroupby/Expanding/ExpandingGroupby
Why are the changes needed?
Improve PS api coverage
Does this PR introduce any user-facing change?
No
How was this patch tested?
CI passed