Skip to content

[SPARK-58314][PYTHON] Remove ArrowStreamUDFSerializer - #57507

Closed
Yicong-Huang wants to merge 1 commit into
apache:masterfrom
Yicong-Huang:SPARK-58314
Closed

[SPARK-58314][PYTHON] Remove ArrowStreamUDFSerializer#57507
Yicong-Huang wants to merge 1 commit into
apache:masterfrom
Yicong-Huang:SPARK-58314

Conversation

@Yicong-Huang

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Removes the now-unused ArrowStreamUDFSerializer class from python/pyspark/sql/pandas/serializers.py, and updates two stale docstring references to it in conversion.py (ArrowBatchTransformer.flatten_struct / wrap_struct).

After the PythonEvalType refactor moved serializer construction into worker.py and its last subclass TransformWithStateInPySparkRowSerializer was removed (SPARK-58297), ArrowStreamUDFSerializer has no remaining runtime users. The flatten_struct / wrap_struct transformer methods it used to call are retained -- they are still used directly by the Arrow UDF mappers in worker.py.

Why are the changes needed?

Dead-code cleanup. Part of SPARK-55388.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Existing tests. No behavior change.

Was this patch authored or co-authored using generative AI tooling?

No.

@uros-b

uros-b commented Jul 24, 2026

Copy link
Copy Markdown
Member

Thank you for the cleanup @Yicong-Huang!

Yicong-Huang added a commit that referenced this pull request Jul 26, 2026
### What changes were proposed in this pull request?

Removes the now-unused `ArrowStreamUDFSerializer` class from `python/pyspark/sql/pandas/serializers.py`, and updates two stale docstring references to it in `conversion.py` (`ArrowBatchTransformer.flatten_struct` / `wrap_struct`).

After the PythonEvalType refactor moved serializer construction into `worker.py` and its last subclass `TransformWithStateInPySparkRowSerializer` was removed (SPARK-58297), `ArrowStreamUDFSerializer` has no remaining runtime users. The `flatten_struct` / `wrap_struct` transformer methods it used to call are retained -- they are still used directly by the Arrow UDF mappers in `worker.py`.

### Why are the changes needed?

Dead-code cleanup. Part of SPARK-55388.

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Existing tests. No behavior change.

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes #57507 from Yicong-Huang/SPARK-58314.

Authored-by: Yicong Huang <17627829+Yicong-Huang@users.noreply.github.com>
Signed-off-by: Yicong-Huang <17627829+Yicong-Huang@users.noreply.github.com>
(cherry picked from commit c7b2f1a)
Signed-off-by: Yicong-Huang <17627829+Yicong-Huang@users.noreply.github.com>
@Yicong-Huang

Copy link
Copy Markdown
Contributor Author

Merge Summary:

Posted by merge_spark_pr.py

@Yicong-Huang

Copy link
Copy Markdown
Contributor Author

Thanks @dongjoon-hyun and @uros-b !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants