cloud-fan commented on code in PR #50468: URL: https://github.com/apache/spark/pull/50468#discussion_r2035584444
########## sql/core/src/test/scala/org/apache/spark/sql/collation/DefaultCollationTestSuite.scala: ########## @@ -475,6 +475,44 @@ class DefaultCollationTestSuiteV1 extends DefaultCollationTestSuite { checkAnswer(sql(s"SELECT COUNT(*) FROM $testView WHERE c2 = 'b'"), Seq(Row(0))) } } + + test("ALTER VIEW check default collation") { + Seq("", "TEMPORARY").foreach { temporary => + withView(testView) { + sql(s"CREATE $temporary VIEW $testView DEFAULT COLLATION UTF8_LCASE AS SELECT 1") + sql(s"ALTER VIEW $testView AS SELECT 'a' AS c1, 'b' AS c2") + val prefix = "SYSTEM.BUILTIN" + checkAnswer(sql(s"SELECT DISTINCT COLLATION(c1) FROM $testView"), Review Comment: nit: do we need to add `DISTINCT`? The view only has one row. -- 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