-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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
[SPARK-22980][PYTHON][SQL] Clarify the length of each series is of each batch within scalar Pandas UDF #20237
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2184,6 +2184,11 @@ def pandas_udf(f=None, returnType=None, functionType=None): | |
| 8| JOHN DOE| 22| | ||
+----------+--------------+------------+ | ||
|
||
.. note:: The length of `pandas.Series` within a scalar UDF is not that of the whole input | ||
column, but is the length of an internal batch used for each call to the function. | ||
Therefore, this can be used, for example, to ensure the length of each returned | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
How about There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I meant to ensure the length of the batch because we declare "The length of the returned |
||
`pandas.Series`, and can not be used as the column length. | ||
|
||
2. GROUP_MAP | ||
|
||
A group map UDF defines transformation: A `pandas.DataFrame` -> A `pandas.DataFrame` | ||
|
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:
but is
->but