[SPARK-54631][PYTHON] Add profiler support for Arrow Grouped Iter Aggregate UDF #53374
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?
spark.python.profile: AddSQL_GROUPED_AGG_ARROW_ITER_UDFto the profiler warning list inudf.pyso that whenspark.python.profileis enabled, users will see appropriate warnings consistent with other iterator-based UDFs.spark.sql.pyspark.udf.profiler: No changes needed. This UDF type already works correctly because it returns scalar (not iterator), so it uses the non-iterator profiler branch inwrap_perf_profilerandwrap_memory_profiler.Why are the changes needed?
To make profilers support for
SQL_GROUPED_AGG_ARROW_ITER_UDFconsistent with other UDFs.Does this PR introduce any user-facing change?
Yes. When users enable
spark.python.profilewithSQL_GROUPED_AGG_ARROW_ITER_UDF, they will now see a warning message consistent with other iterator-based UDFs.How was this patch tested?
Added a test case
test_perf_profiler_arrow_udf_grouped_agg_iterto verify thatspark.sql.pyspark.udf.profilerworks correctly with this UDF type. Also verified that thespark.python.profileprofiler warning is triggered correctly intest_unsupported.Was this patch authored or co-authored using generative AI tooling?
No.