[SPARK-56584][PYTHON] Generalize RESULT_TYPE_MISMATCH_FOR_ARROW_UDF error class and remove dead SCHEMA_MISMATCH_FOR_ARROW_PYTHON_UDF#55494
Closed
Yicong-Huang wants to merge 1 commit intoapache:masterfrom
Closed
Conversation
…rror class and remove dead SCHEMA_MISMATCH_FOR_ARROW_PYTHON_UDF
RESULT_TYPE_MISMATCH_FOR_ARROW_UDF error class and remove dead SCHEMA_MISMATCH_FOR_ARROW_PYTHON_UDF
Contributor
Author
HyukjinKwon
approved these changes
Apr 23, 2026
gaogaotiantian
approved these changes
Apr 23, 2026
Member
|
Merged to master. |
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?
Two related cleanups in the PySpark result-verify path:
RESULT_TYPE_MISMATCH_FOR_ARROW_UDFto the more generalRESULT_COLUMN_TYPES_MISMATCH(parallel toRESULT_COLUMN_NAMES_MISMATCH/RESULT_COLUMN_SCHEMA_MISMATCH). The error is raised from the genericverify_arrow_resultpath inpython/pyspark/worker.py; the name shouldn't mention "ARROW_UDF".Columns do not match in their data type: <mismatch>.Column types of the returned data do not match specified schema. Mismatch: <mismatch>.SCHEMA_MISMATCH_FOR_ARROW_PYTHON_UDF.git grepconfirms no code path raises it, and its message body is identical toSCHEMA_MISMATCH_FOR_PANDAS_UDF.Why are the changes needed?
Part of SPARK-55388 (Refactor PythonEvalType processing logic). Cleanup to make error class names and messages consistent across the result-verify path, and to remove dead code.
Does this PR introduce any user-facing change?
Yes. User-visible error class name and message for result column type mismatches in Arrow UDFs change. The unreleased
SCHEMA_MISMATCH_FOR_ARROW_PYTHON_UDFclass is removed (no code raised it).How was this patch tested?
Updated 4 existing asserts in
test_arrow_grouped_map.pyandtest_arrow_cogrouped_map.pythat match the new message.Was this patch authored or co-authored using generative AI tooling?
No