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-47102][SQL] Add the COLLATION_ENABLED
config flag
#45285
Conversation
0a3a336
to
16b468e
Compare
...catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/collationExpressions.scala
Outdated
Show resolved
Hide resolved
sql/core/src/test/scala/org/apache/spark/sql/CollationSuite.scala
Outdated
Show resolved
Hide resolved
sql/core/src/test/scala/org/apache/spark/sql/errors/QueryCompilationErrorsSuite.scala
Outdated
Show resolved
Hide resolved
sql/core/src/test/scala/org/apache/spark/sql/CollationSuite.scala
Outdated
Show resolved
Hide resolved
sql/core/src/test/scala/org/apache/spark/sql/errors/QueryCompilationErrorsSuite.scala
Outdated
Show resolved
Hide resolved
...catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/collationExpressions.scala
Show resolved
Hide resolved
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryCompilationErrors.scala
Outdated
Show resolved
Hide resolved
...catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/collationExpressions.scala
Outdated
Show resolved
Hide resolved
164dd52
to
a9f2c19
Compare
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala
Outdated
Show resolved
Hide resolved
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/rules.scala
Show resolved
Hide resolved
sql/core/src/main/scala/org/apache/spark/sql/internal/BaseSessionStateBuilder.scala
Show resolved
Hide resolved
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala
Outdated
Show resolved
Hide resolved
sql/core/src/test/scala/org/apache/spark/sql/errors/QueryCompilationErrorsSuite.scala
Outdated
Show resolved
Hide resolved
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/rules.scala
Outdated
Show resolved
Hide resolved
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/rules.scala
Outdated
Show resolved
Hide resolved
...catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/collationExpressions.scala
Outdated
Show resolved
Hide resolved
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.
introduces new error class COLLATION_SUPPORT_NOT_ENABLED to appropriately report error
@mihailom-db Could update PR's description according to your recent changes. In particular, change the name of the error class.
Also, please add Closes #45218
to PR's description to close the PR automatically when this PR be merged.
@mihailom-db The test failure is related to your changes:
Please, fix it. |
COLLATION_ENABLED
config flag
The failed GA Run / Build modules: pyspark-connect has been passed already a couple comments before. Highly likely, it is not related to the changes. |
+1, LGTM. Merging to master. |
### What changes were proposed in this pull request? This PR adds `COLLATION_ENABLED` config to `SQLConf` and introduces new error class `UNSUPPORTED_FEATURE.COLLATION` to appropriately report error on usage of feature under development. Closes apache#45218 ### Why are the changes needed? We want to make collations configurable on this flag. These changes disable usage of `collate` and `collation` functions, along with any `COLLATE` syntax 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? ``` ./build/mvn -Dtest=none -DwildcardSuites=org.apache.spark.sql.errors.QueryCompilationErrorsSuite test ./build/mvn -Dtest=none -DwildcardSuites=org.apache.spark.sql.catalyst.expressions.CollationExpressionSuite test ./build/mvn -Dtest=none -DwildcardSuites=org.apache.spark.sql.CollationSuite test ``` ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#45285 from mihailom-db/SPARK-47102. Authored-by: Mihailo Milosevic <mihailo.milosevic@databricks.com> Signed-off-by: Max Gekk <max.gekk@gmail.com>
What changes were proposed in this pull request?
This PR adds
COLLATION_ENABLED
config toSQLConf
and introduces new error classUNSUPPORTED_FEATURE.COLLATION
to appropriately report error on usage of feature under development.Closes #45218
Why are the changes needed?
We want to make collations configurable on this flag. These changes disable usage of
collate
andcollation
functions, along with anyCOLLATE
syntax 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.