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