[SPARK-57645][PYTHON][TESTS] Add ASV microbenchmark for SQL_GROUPED_AGG_PANDAS_ITER_UDF#56730
Open
Yicong-Huang wants to merge 1 commit into
Open
Conversation
Member
Minor note regarding the PR description, please confirm - in worker.py: the non-iterator SQL_GROUPED_AGG_PANDAS_UDF writes via ArrowStreamGroupSerializer(write_start_stream=True) while the ITER variant uses ArrowStreamAggPandasUDFSerializer; genuinely different output serializers/markers, so the byte streams are not identical. Please update in order to avoid misleading a future reader. |
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?
Add an ASV microbenchmark for
SQL_GROUPED_AGG_PANDAS_ITER_UDFtopython/benchmarks/bench_eval_type.py, parallel to the existingGroupedAggArrowIterUDFTimeBench. New classes:_GroupedAggPandasIterBenchMixin,GroupedAggPandasIterUDFTimeBench, andGroupedAggPandasIterUDFPeakmemBench. The mixin reuses_write_scenario/_build_scenario/_scenario_configsfrom the non-iterator Pandas sibling and only overrides the eval type and the iterator-style UDFs (sum_udf,mean_multi_udf) that consume anIterator[pd.Series].Why are the changes needed?
SQL_GROUPED_AGG_PANDAS_ITER_UDFhad no worker-level microbenchmark. This fills the coverage gap and provides a before/after baseline for an upcoming serializer refactor of this eval type.Does this PR introduce any user-facing change?
No.
How was this patch tested?
Existing tests. Benchmark-only addition. The worker output of the new iterator bench was verified to be byte-identical to the non-iterator Pandas grouped-agg bench across all scenario/UDF combinations (only the trailing timing telemetry differs).
ASV results (
COLUMNS=120 asv run --bench GroupedAggPandasIterUDFTimeBench -a repeat=3 --python=same):Numbers are stable across two local runs (deltas < 3%).
Was this patch authored or co-authored using generative AI tooling?
No.