-
Notifications
You must be signed in to change notification settings - Fork 28.6k
[SPARK-52219][SQL] Schema level collation support for tables #50937
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
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e3c2bac
to
c6387e2
Compare
...rc/main/scala/org/apache/spark/sql/catalyst/analysis/ApplyDefaultCollationToStringType.scala
Outdated
Show resolved
Hide resolved
5c5f6e5
to
3b2b537
Compare
@cloud-fan can you please review? |
dejankrak-db
approved these changes
May 20, 2025
sql/api/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBaseParser.g4
Outdated
Show resolved
Hide resolved
...rc/main/scala/org/apache/spark/sql/catalyst/analysis/ApplyDefaultCollationToStringType.scala
Outdated
Show resolved
Hide resolved
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala
Outdated
Show resolved
Hide resolved
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/v2Commands.scala
Outdated
Show resolved
Hide resolved
sql/core/src/main/scala/org/apache/spark/sql/execution/command/ddl.scala
Outdated
Show resolved
Hide resolved
sql/core/src/test/scala/org/apache/spark/sql/collation/DefaultCollationTestSuite.scala
Outdated
Show resolved
Hide resolved
sql/core/src/test/scala/org/apache/spark/sql/errors/QueryCompilationErrorsSuite.scala
Outdated
Show resolved
Hide resolved
1a66b0a
to
22e1433
Compare
cloud-fan
reviewed
May 21, 2025
sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/SupportsNamespaces.java
Show resolved
Hide resolved
22e1433
to
9303ab3
Compare
9303ab3
to
9f7ae53
Compare
9f7ae53
to
b8c9e84
Compare
cloud-fan
reviewed
May 22, 2025
sql/core/src/test/scala/org/apache/spark/sql/test/SQLTestUtils.scala
Outdated
Show resolved
Hide resolved
cloud-fan
reviewed
May 22, 2025
...rc/main/scala/org/apache/spark/sql/catalyst/analysis/ApplyDefaultCollationToStringType.scala
Outdated
Show resolved
Hide resolved
cloud-fan
reviewed
May 22, 2025
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/v2Commands.scala
Outdated
Show resolved
Hide resolved
e54edc7
to
9980b52
Compare
cloud-fan
reviewed
May 22, 2025
...rc/main/scala/org/apache/spark/sql/catalyst/analysis/ApplyDefaultCollationToStringType.scala
Outdated
Show resolved
Hide resolved
958255d
to
b41c819
Compare
cloud-fan
reviewed
May 22, 2025
sql/core/src/main/scala/org/apache/spark/sql/execution/command/ddl.scala
Outdated
Show resolved
Hide resolved
cloud-fan
reviewed
May 22, 2025
sql/core/src/main/scala/org/apache/spark/sql/execution/command/SetNamespaceCollation.scala
Outdated
Show resolved
Hide resolved
cloud-fan
reviewed
May 22, 2025
...test/scala/org/apache/spark/sql/execution/command/AlterNamespaceSetPropertiesSuiteBase.scala
Outdated
Show resolved
Hide resolved
fbc65dc
to
c45ec0b
Compare
c45ec0b
to
fef0bd3
Compare
cloud-fan
approved these changes
May 23, 2025
thanks, merging to master! |
ilicmarkodb
added a commit
to ilicmarkodb/spark
that referenced
this pull request
May 23, 2025
### What changes were proposed in this pull request? Added support for setting and altering a default collation at the schema level. Tables that do not specify their own collation will now automatically inherit the schema-level default. `CREATE SCHEMA schema1 DEFAULT COLLATION UTF8_LCASE; CREATE TABLE t1 (c1 STRING);` The default collation for table `t1` will be `UTF8_LCASE`. and c1 data type will be `STRING COLLATE UTF8_LCASE`. Following PRs will add support for Views, UDFs. ### Why are the changes needed? New feature. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Tests added to `DefaultCollationTestSuite.scala`. ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#50937 from ilicmarkodb/schema_level_collation. Authored-by: ilicmarkodb <[email protected]> Signed-off-by: Wenchen Fan <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Added support for setting and altering a default collation at the schema level.
Tables that do not specify their own collation will now automatically inherit the schema-level default.
CREATE SCHEMA schema1 DEFAULT COLLATION UTF8_LCASE; CREATE TABLE t1 (c1 STRING);
The default collation for table
t1
will beUTF8_LCASE
. and c1 data type will beSTRING COLLATE UTF8_LCASE
.Following PRs will add support for Views, UDFs.
Why are the changes needed?
New feature.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Tests added to
DefaultCollationTestSuite.scala
.Was this patch authored or co-authored using generative AI tooling?
No.