[SPARK-51330][PYTHON] Enable spark.sql.execution.pythonUDTF.arrow.enabled by default#50096
Closed
HyukjinKwon wants to merge 1 commit intoapache:masterfrom
Closed
[SPARK-51330][PYTHON] Enable spark.sql.execution.pythonUDTF.arrow.enabled by default#50096HyukjinKwon wants to merge 1 commit intoapache:masterfrom
HyukjinKwon wants to merge 1 commit intoapache:masterfrom
Conversation
Member
Author
zhengruifeng
approved these changes
Feb 27, 2025
Contributor
allisonwang-db
left a comment
There was a problem hiding this comment.
For consistent with Python UDFs, yes we should enable this. But arrow code path does not necessarily have performance improvements (or it can even lead to perf regressions). It only helps when the output table size is large:
https://spark.apache.org/docs/latest/api/python/user_guide/sql/python_udtf.html#arrow-optimization
I think https://issues.apache.org/jira/browse/SPARK-44856 needs to be worked on first to make arrow code path more performant for small output size.
cc @ueshin @wengh
Member
Author
|
Made a draft PR for SPARK-44856 #50099 |
HyukjinKwon
added a commit
that referenced
this pull request
Feb 28, 2025
…pInPandas/mapInArrow batched in byte size ### What changes were proposed in this pull request? This PR is a followup of #50096 that reverts unrelated changes and mark mapInPandas/mapInArrow batched in byte size ### Why are the changes needed? To make the original change self-contained, and mark mapInPandas/mapInArrow batched in byte size to be consistent. ### Does this PR introduce _any_ user-facing change? No, the main change has not been released out yet. ### How was this patch tested? Manually. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #50111 from HyukjinKwon/SPARK-51316-followup. Authored-by: Hyukjin Kwon <gurwls223@apache.org> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
HyukjinKwon
added a commit
that referenced
this pull request
Feb 28, 2025
…pInPandas/mapInArrow batched in byte size ### What changes were proposed in this pull request? This PR is a followup of #50096 that reverts unrelated changes and mark mapInPandas/mapInArrow batched in byte size ### Why are the changes needed? To make the original change self-contained, and mark mapInPandas/mapInArrow batched in byte size to be consistent. ### Does this PR introduce _any_ user-facing change? No, the main change has not been released out yet. ### How was this patch tested? Manually. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #50111 from HyukjinKwon/SPARK-51316-followup. Authored-by: Hyukjin Kwon <gurwls223@apache.org> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org> (cherry picked from commit 5b45671) Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
a0x8o
added a commit
to a0x8o/spark
that referenced
this pull request
Feb 28, 2025
…pInPandas/mapInArrow batched in byte size ### What changes were proposed in this pull request? This PR is a followup of apache/spark#50096 that reverts unrelated changes and mark mapInPandas/mapInArrow batched in byte size ### Why are the changes needed? To make the original change self-contained, and mark mapInPandas/mapInArrow batched in byte size to be consistent. ### Does this PR introduce _any_ user-facing change? No, the main change has not been released out yet. ### How was this patch tested? Manually. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #50111 from HyukjinKwon/SPARK-51316-followup. Authored-by: Hyukjin Kwon <gurwls223@apache.org> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
Member
Author
|
let me close this for now. I think behaviour diff is too much. |
zifeif2
pushed a commit
to zifeif2/spark
that referenced
this pull request
Nov 14, 2025
…pInPandas/mapInArrow batched in byte size ### What changes were proposed in this pull request? This PR is a followup of apache#50096 that reverts unrelated changes and mark mapInPandas/mapInArrow batched in byte size ### Why are the changes needed? To make the original change self-contained, and mark mapInPandas/mapInArrow batched in byte size to be consistent. ### Does this PR introduce _any_ user-facing change? No, the main change has not been released out yet. ### How was this patch tested? Manually. ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#50111 from HyukjinKwon/SPARK-51316-followup. Authored-by: Hyukjin Kwon <gurwls223@apache.org> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org> (cherry picked from commit 984e091) Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
sunchao
pushed a commit
that referenced
this pull request
Mar 16, 2026
…pInPandas/mapInArrow batched in byte size This PR is a followup of #50096 that reverts unrelated changes and mark mapInPandas/mapInArrow batched in byte size To make the original change self-contained, and mark mapInPandas/mapInArrow batched in byte size to be consistent. No, the main change has not been released out yet. Manually. No. Closes #50111 from HyukjinKwon/SPARK-51316-followup. Authored-by: Hyukjin Kwon <gurwls223@apache.org> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org> (cherry picked from commit 5b45671) Signed-off-by: Hyukjin Kwon <gurwls223@apache.org> (cherry picked from commit 1df6fc6)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
This PR enables
spark.sql.execution.pythonUDTF.arrow.enabledby default.Why are the changes needed?
We enabled Arrow optimization #49482 and #50036. We should also enable it for UDTF too.
Does this PR introduce any user-facing change?
It will fallback to non-optimized code path so it impact will be minimized. Users will leverage Arrow optimization by default.
How was this patch tested?
Existing tests in the CI.
Was this patch authored or co-authored using generative AI tooling?
No