Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-45661][SQL][PYTHON] Add toNullable in StructType, MapType and ArrayType #43523

Closed
wants to merge 2 commits into from

Conversation

HyukjinKwon
Copy link
Member

What changes were proposed in this pull request?

This PR proposes to add:

  • StructType.toNullable
  • MapType.toNullable
  • ArrayType.toNullable

that returns a nullable schema.

Why are the changes needed?

See https://stackoverflow.com/questions/33193958/change-nullable-property-of-column-in-spark-dataframe as an example.

Does this PR introduce any user-facing change?

Yes, it adds new API in both Scala and Python:

  • StructType.toNullable
  • MapType.toNullable
  • ArrayType.toNullable

How was this patch tested?

For Scala, it just adds an alias.
For Python side, doctests were added.

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

No.

@HyukjinKwon
Copy link
Member Author

Merged to master.

@HyukjinKwon HyukjinKwon deleted the SPARK-45661 branch January 15, 2024 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants