Skip to content

[SPARK-56661] Fixing MapPartitionsExternalUDF to generate output attributes only once#56206

Open
sven-weber-db wants to merge 1 commit into
apache:masterfrom
sven-weber-db:sven-weber_data/fix-map-op
Open

[SPARK-56661] Fixing MapPartitionsExternalUDF to generate output attributes only once#56206
sven-weber-db wants to merge 1 commit into
apache:masterfrom
sven-weber-db:sven-weber_data/fix-map-op

Conversation

@sven-weber-db
Copy link
Copy Markdown
Contributor

@sven-weber-db sven-weber-db commented May 29, 2026

What changes were proposed in this pull request?

This is a follow-up PR on the recently merged 55768. I noticed that the MapPartitionsExternalUDF re-generates its output attributes on every function call. Instead, we should compute the output attributes once and store them in a local variable. This behavior is fixed by this PR.

Why are the changes needed?

The current behavior re-computes the attributes over and over again while they are not expected to change.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Existing unit tests for this class.

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

No

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.

1 participant