MaxGekk commented on code in PR #45285:
URL: https://github.com/apache/spark/pull/45285#discussion_r1506256531


##########
sql/core/src/test/scala/org/apache/spark/sql/errors/QueryCompilationErrorsSuite.scala:
##########
@@ -964,6 +964,52 @@ class QueryCompilationErrorsSuite
         "className" -> "org.apache.spark.sql.catalyst.expressions.UnsafeRow"))
   }
 
+  test("SPARK-47102: Collate in CollateClauseContext when COLLATION_ENABLED is 
false") {

Review Comment:
   I think you can fold all those 4 tests to one like:
   ```scala
     test("SPARK-47102: the collation feature is off") {
       withSQLConf(SQLConf.COLLATION_ENABLED.key -> "false") {
         Seq(
           "CREATE TABLE t(col STRING COLLATE 'UNICODE_CI') USING parquet",
           "SELECT collate('aaa', 'UNICODE_CI')",
           "SELECT 'aaa' COLLATE 'UNICODE_CI'",
           "select collation('aaa')"
         ).foreach { sqlText =>
           checkError(
             exception = intercept[AnalysisException](sql(sqlText)),
             errorClass = "UNSUPPORTED_FEATURE.COLLATION")
         }
       }
     }
   ```



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to