[SPARK-47102][SQL][COLLATION] Adding COLLATION_ENABLED config#45218
[SPARK-47102][SQL][COLLATION] Adding COLLATION_ENABLED config#45218mihailomilosevic2001 wants to merge 14 commits intoapache:masterfrom
Conversation
23f1d40 to
f36a767
Compare
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala
Outdated
Show resolved
Hide resolved
...catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/collationExpressions.scala
Outdated
Show resolved
Hide resolved
...lyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CollationExpressionSuite.scala
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
| "Collation feature is under development and not all features are supported. To enable existing features toggle `COLLATION_ENABLED` flag to true." | |
| "Collation support is under development and not all features are supported. To enable existing features set `spark.sql.collation.enabled` to `true`." |
There was a problem hiding this comment.
Out of curiosity: do we have or want any mechanism to disallow the enablement of the feature?
There was a problem hiding this comment.
If I understood correctly, we want to make sure that customer is prevented from trying to use partially built feature and getting in trouble because some functionality was not implemented at the time.
There was a problem hiding this comment.
This is a good question. I am not sure what is the policy here - @cloud-fan and @MaxGekk - can you guide us here?
There was a problem hiding this comment.
Preventing the use of a partially baked feature is a good reason here.
...catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/collationExpressions.scala
Outdated
Show resolved
Hide resolved
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryCompilationErrors.scala
Outdated
Show resolved
Hide resolved
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryCompilationErrors.scala
Outdated
Show resolved
Hide resolved
...lyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CollationExpressionSuite.scala
Outdated
Show resolved
Hide resolved
...lyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CollationExpressionSuite.scala
Outdated
Show resolved
Hide resolved
|
One more thing: it would be nice to add the |
8415953 to
2b85cf9
Compare
...lyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CollationExpressionSuite.scala
Outdated
Show resolved
Hide resolved
sql/core/src/test/scala/org/apache/spark/sql/errors/QueryCompilationErrorsSuite.scala
Outdated
Show resolved
Hide resolved
|
PR should be ready now, but until I get GitHub Actions fixed for my account, CI runs can't be run before merging. Will ping when that gets fixed. |
0ef3f97 to
86a9a58
Compare
84eec82 to
b3a1ea0
Compare
|
Switched to #45285 as GitHub Actions are not enabled on my account. Please provide review on that PR. |
What changes were proposed in this pull request?
This PR adds
COLLATION_ENABLEDconfig toSQLConfand introduces new error classCOLLATION_SUPPORT_NOT_ENABLEDto appropriately report error on usage of feature under development.Why are the changes needed?
We want to make collations configurable on this flag. These changes disable usage of
collateandcollationfunctions, along with anyCOLLATEsyntax when the flag is set to false. By default, the flag is set to false.Does this PR introduce any user-facing change?
Yes. It introduces new error along with an appropriate message.
How was this patch tested?
Was this patch authored or co-authored using generative AI tooling?
No.