Yicong Huang created SPARK-56612:
------------------------------------

             Summary: Unify verify_result and container-type checks into 
verify_return_type helper
                 Key: SPARK-56612
                 URL: https://issues.apache.org/jira/browse/SPARK-56612
             Project: Spark
          Issue Type: Sub-task
          Components: PySpark
    Affects Versions: 4.2.0
            Reporter: Yicong Huang


Combine `verify_result` (iterator factory in 
`python/pyspark/sql/pandas/serializers.py`) and scattered container-type 
`isinstance` checks into a unified helper:

{code:python}
verify_return_type(result, expected_type, *, iterator=False)
{code}

Replace existing `verify_result` callers (SQL_SCALAR_ARROW_UDF and 
SQL_SCALAR_ARROW_ITER_UDF) with the unified form. This enables downstream 
refactors to replace inline `isinstance` checks with a single well-named helper 
across all eval types.

Part of SPARK-55388.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to