cloud-fan commented on code in PR #45946:
URL: https://github.com/apache/spark/pull/45946#discussion_r1560522533
##########
sql/core/src/test/scala/org/apache/spark/sql/internal/SQLConfSuite.scala:
##########
@@ -505,7 +505,23 @@ class SQLConfSuite extends QueryTest with
SharedSparkSession {
|""".stripMargin)
}
- test("SPARK-43028: config not found error") {
+ test("set collation") {
+ Seq("UNICODE", "UNICODE_CI", "utf8_binary_lcase", "utf8_binary").foreach {
collation =>
+ sql(s"set collation $collation")
+ assert(spark.conf.get(SQLConf.DEFAULT_COLLATION) ===
collation.toUpperCase(Locale.ROOT))
+ }
+
+ checkError(
+ exception = intercept[SparkException] {
+ sql(s"SET COLLATION unicode_c").collect()
+ },
+ errorClass = "COLLATION_INVALID_NAME",
+ parameters = Map(
+ "collationName" -> "UNICODE_C",
+ "proposal" -> "UNICODE_CI"))
+ }
+
+ test("SPARK-43028: config not found error") {
Review Comment:
```suggestion
test("SPARK-43028: config not found error") {
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]