[SPARK-56837][PYTHON][TESTS] Pass ArrowBatchedUDF benchmark input_type via EvalConf#55834
Open
Yicong-Huang wants to merge 1 commit into
Open
Conversation
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?
_ArrowBatchedBenchMixin._write_scenarioinpython/benchmarks/bench_eval_type.pywrote theinput_typeschema JSON as a length-prefixed UTF-8 string before the UDF payload. This was the old wire-protocol shape. Since SPARK-56340 (move input_type schema to eval conf), the worker readsinput_typeviaEvalConfinstead, so the extra prefix gets parsed as the UDF count and the worker exits withUnicodeDecodeErrorwhile reading subsequent UTF-8 fields.This PR moves the schema to
eval_conf={"input_type": schema.json()}, matching the pattern already used by the_ArrowTableUDFBenchMixin.Why are the changes needed?
Running any
ArrowBatchedUDFTimeBench/ArrowBatchedUDFPeakmemBenchASV benchmark currently fails with:The bench file is the only
SQL_ARROW_BATCHED_UDFmock writer in the tree and was missed when the worker protocol changed.Does this PR introduce any user-facing change?
No. Test-only change.
How was this patch tested?
Running both bench classes locally now succeeds. Numbers from one run:
Run commands:
Smoke-tested all 40 benchmark classes in the file (every other class still passes; only the two ArrowBatched classes were broken).
Was this patch authored or co-authored using generative AI tooling?
No.