-
Notifications
You must be signed in to change notification settings - Fork 28.2k
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-48739][SQL] Disable writing collated data to file formats that don't support them in non managed tables #47127
base: master
Are you sure you want to change the base?
[SPARK-48739][SQL] Disable writing collated data to file formats that don't support them in non managed tables #47127
Conversation
@cloud-fan Please take a look when you find the time |
@@ -536,10 +536,12 @@ case class DataSource( | |||
dataSource.toString, field) | |||
} | |||
} | |||
DataSourceUtils.verifyCollations(dataSource, data.schema) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we combine this with the data.schema.foreach
check mentioned above?
For internal file source API, I think we can simply update For data source v1, we can add a new API to UPDATE: actually |
This would mean that we wouldn't be able to create spark managed tables with collations for those formats. Is that something that we want to do? |
To confirm the goal of this PR: we want to have a new API for file sources to indicate that a type is supported only with a catalog? I think we should be more specific about this, as there are many APIs to use a file source:
|
What changes were proposed in this pull request?
Disable writing collated types to data sources that don't support them. However, spark managed tables should still work as the schema is in HMS and not in the file itself.
Why are the changes needed?
Right now, when users write a collated type directly to json, text, orc.. they will not see that collation when reading back.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Added new UTs
Was this patch authored or co-authored using generative AI tooling?
No.