dbatomic commented on code in PR #45218:
URL: https://github.com/apache/spark/pull/45218#discussion_r1499518489


##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CollationExpressionSuite.scala:
##########
@@ -19,59 +19,75 @@ package org.apache.spark.sql.catalyst.expressions
 
 import org.apache.spark.{SparkException, SparkFunSuite}
 import org.apache.spark.sql.catalyst.util.CollationFactory
+import org.apache.spark.sql.internal.SQLConf
 import org.apache.spark.sql.types._
 
 class CollationExpressionSuite extends SparkFunSuite with ExpressionEvalHelper 
{
   test("validate default collation") {
-    val collationId = CollationFactory.collationNameToId("UCS_BASIC")
-    assert(collationId == 0)
-    val collateExpr = Collate(Literal("abc"), "UCS_BASIC")
-    assert(collateExpr.dataType === StringType(collationId))
-    collateExpr.dataType.asInstanceOf[StringType].collationId == 0
-    checkEvaluation(collateExpr, "abc")
+    withSQLConf(SQLConf.COLLATION_ENABLED.key -> "true") {

Review Comment:
   Can we avoid adding `withSQLConf` to every test?
   Instead, maybe we can use `beforeAll` override and add `withSparkEnvConfs` 
there?



-- 
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]

Reply via email to