You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2026/08/03 22:16:00 UTC
[jira] [Updated] (SPARK-58529) Unify RESULT_ROWS_MISMATCH message and consolidate row count verification in worker.py
[ https://issues.apache.org/jira/browse/SPARK-58529?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated SPARK-58529:
-----------------------------------
Labels: pull-request-available (was: )
> Unify RESULT_ROWS_MISMATCH message and consolidate row count verification in worker.py
> --------------------------------------------------------------------------------------
>
> Key: SPARK-58529
> URL: https://issues.apache.org/jira/browse/SPARK-58529
> Project: Spark
> Issue Type: Improvement
> Components: PySpark
> Affects Versions: 4.3.0
> Reporter: Yicong Huang
> Priority: Major
> Labels: pull-request-available
>
> worker.py raises RESULT_ROWS_MISMATCH from four places when a UDF returns a row count that doesn't match the input. SPARK-58161 hardcoded a message= override at each of them carrying a pandas-specific tail: "... Result vector from pandas_udf was not the required length: expected N, got M." This tail is incorrect on the arrow UDF path: verify_scalar_result is also called for arrow UDFs, yet the message says "pandas_udf". This removes all four hardcoded message= overrides so the generic RESULT_ROWS_MISMATCH template applies uniformly.
> The RESULT_ROWS_MISMATCH message changes from "The number of output rows (M) must match the number of input rows (N). Result vector from pandas_udf was not the required length: expected N, got M." to "The number of output rows (M) must match the number of input rows (N)."
> While here, consolidate the two row-count helpers -- verify_result_row_count (list length) and the iterator-based generator -- into a single judgement function that the generator delegates to, and drop the now-redundant error_class branch left over from SPARK-58161.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org