You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SPARK-51067][SQL] Revert session level collation for DML queries and apply object level collation for DDL queries
### What changes were proposed in this pull request?
This PR is a partial revert of the original PR #48962 that introduced the resolution of default session level collation for DDL and DML queries.
The part that is reverted is the default collation resolution for DML queries, whereas the part that is kept is the default collation resolution for DDL queries, which is required to apply the object level collation that was introduced as part of PR #49084. As part of this logic, object level collation is now applied to DDL queries accordingly, with the main logic implemented in ResolveDefaultStringTypes.stringTypeForDDLCommand() method.
### Why are the changes needed?
As there were some unresolved technical issues when attempting to merge the functionality from PR #48962 on Delta side, due to its effect on DML queries, it was decided to pause this functionality for now, thus partially reverting unused parts for maintaining a cleaner code moving forward.
Also, this is inline with customer feedback where object level collation is much more requested functionality, so the focus is to introduce the resolution of object level collation for DDL queries instead, allowing the collation to be specified per table or view on their creation or modification, with propagating the default collation specified to subsequent queries on top of those entities.
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Existing tests that cover the collations functionality, as well adding new dedicated tests for applying object level collation to the underlying columns.
### Was this patch authored or co-authored using generative AI tooling?
No
Closes#49772 from dejankrak-db/revert-session-collations.
Lead-authored-by: Dejan Krakovic <dejan.krakovic@databricks.com>
Co-authored-by: Stefan Kandic <stefan.kandic@databricks.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
(cherry picked from commit e92e12a)
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
0 commit comments