Skip to content

[SPARK-58157][PYTHON] Remove TransformWithStateInPySparkRowInitStateSerializer#57438

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

[SPARK-58157][PYTHON] Remove TransformWithStateInPySparkRowInitStateSerializer#57438
Yicong-Huang wants to merge 1 commit into
apache:masterfrom
Yicong-Huang:SPARK-58157

Conversation

@Yicong-Huang

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Delete TransformWithStateInPySparkRowInitStateSerializer from python/pyspark/sql/pandas/serializers.py. Its init-state deserialization logic was moved into read_udfs() in worker.py by SPARK-58191 (#57337), which switched SQL_TRANSFORM_WITH_STATE_PYTHON_ROW_INIT_STATE_UDF to use the plain ArrowStreamSerializer for pure Arrow stream I/O. The class is no longer referenced by any eval type. A benchmark comment in bench_eval_type.py that attributed the row-by-row walk to this class is updated to point at read_udfs().

Part of SPARK-55384.

Why are the changes needed?

The class is dead code after the refactor in SPARK-58191. Removing it keeps serializers as pure I/O and avoids a stale, unused class.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Existing tests. This is a dead-code deletion with no remaining references (verified repo-wide, including dynamic lookups); behavior is unchanged since the eval type already runs through read_udfs().

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

No.

@uros-b

uros-b commented Jul 23, 2026

Copy link
Copy Markdown
Member

Thank you @Yicong-Huang and @HyukjinKwon!

@uros-b uros-b closed this in 93c3367 Jul 23, 2026
uros-b pushed a commit that referenced this pull request Jul 23, 2026
…erializer

### What changes were proposed in this pull request?

Delete `TransformWithStateInPySparkRowInitStateSerializer` from `python/pyspark/sql/pandas/serializers.py`. Its init-state deserialization logic was moved into `read_udfs()` in `worker.py` by [SPARK-58191](https://issues.apache.org/jira/browse/SPARK-58191) (#57337), which switched `SQL_TRANSFORM_WITH_STATE_PYTHON_ROW_INIT_STATE_UDF` to use the plain `ArrowStreamSerializer` for pure Arrow stream I/O. The class is no longer referenced by any eval type. A benchmark comment in `bench_eval_type.py` that attributed the row-by-row walk to this class is updated to point at `read_udfs()`.

Part of [SPARK-55384](https://issues.apache.org/jira/browse/SPARK-55384).

### Why are the changes needed?

The class is dead code after the refactor in SPARK-58191. Removing it keeps serializers as pure I/O and avoids a stale, unused class.

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

No.

### How was this patch tested?

Existing tests. This is a dead-code deletion with no remaining references (verified repo-wide, including dynamic lookups); behavior is unchanged since the eval type already runs through `read_udfs()`.

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

No.

Closes #57438 from Yicong-Huang/SPARK-58157.

Authored-by: Yicong Huang <17627829+Yicong-Huang@users.noreply.github.com>
Signed-off-by: Uros Bojanic <221401595+uros-b@users.noreply.github.com>
(cherry picked from commit 93c3367)
Signed-off-by: Uros Bojanic <221401595+uros-b@users.noreply.github.com>
@uros-b

uros-b commented Jul 23, 2026

Copy link
Copy Markdown
Member

Merge Summary:

Posted by merge_spark_pr.py

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