Skip to content

Conversation

@Yicong-Huang
Copy link
Contributor

What changes were proposed in this pull request?

Remove redundant self._timezone and self._safecheck assignments in three serializer classes (ArrowStreamAggArrowUDFSerializer, ArrowStreamAggArrowIterUDFSerializer, ArrowStreamAggPandasUDFSerializer).

Also improve parameter passing by directly passing assign_cols_by_name and arrow_cast to parent class instead of passing fixed values and then overriding them.

Why are the changes needed?

Improves code clarity and consistency by removing redundant code that was already set by parent classes.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Ran existing tests.

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

No.

@HyukjinKwon
Copy link
Member

Merged to master.

xu20160924 pushed a commit to xu20160924/spark that referenced this pull request Dec 9, 2025
### What changes were proposed in this pull request?

Remove redundant `self._timezone` and `self._safecheck` assignments in three serializer classes (`ArrowStreamAggArrowUDFSerializer`, `ArrowStreamAggArrowIterUDFSerializer`, `ArrowStreamAggPandasUDFSerializer`).

Also improve parameter passing by directly passing `assign_cols_by_name` and `arrow_cast` to parent class instead of passing fixed values and then overriding them.

### Why are the changes needed?

Improves code clarity and consistency by removing redundant code that was already set by parent classes.

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

No.

### How was this patch tested?

Ran existing tests.

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

No.

Closes apache#53368 from Yicong-Huang/SPARK-54627/refactor/remove-redundant-initializations.

Authored-by: Yicong-Huang <17627829+Yicong-Huang@users.noreply.github.com>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants