Skip to content

Conversation

malthe
Copy link

@malthe malthe commented Sep 23, 2025

What changes were proposed in this pull request?

This extends DataFrame.withColumn to accept a column name (i.e. string) in addition to a Column expression–see SPARK-53675.

Why are the changes needed?

This follows the API changes introduced in 3.0 where constructs "that previously only accepted a Column object to specify a column can now take a string specifying the column by name".

Does this PR introduce any user-facing change?

Yes, this extends the allowed type to column or name, previous just column.

How was this patch tested?

Simple test added.

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

No.

@malthe malthe force-pushed the 53675-withcolumn-column-name branch from 824a36a to a523381 Compare September 23, 2025 12:50
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.

1 participant