MaxGekk commented on code in PR #50468:
URL: https://github.com/apache/spark/pull/50468#discussion_r2035505402
##########
sql/core/src/test/scala/org/apache/spark/sql/collation/DefaultCollationTestSuite.scala:
##########
@@ -475,6 +475,45 @@ 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 =>
Review Comment:
nit: temporary should be in the same line, see examples in
https://github.com/databricks/scala-style-guide
```suggestion
Seq("", "TEMPORARY").foreach { temporary =>
```
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/command/views.scala:
##########
@@ -754,6 +757,16 @@ object ViewHelper extends SQLConfHelper with Logging {
}
CommandUtils.uncacheTableOrView(session, name)
}
+ // When called from CreateViewCommand, this function determines the
collation from the
+ // DEFAULT COLLATION clause in the query or assigns None if unspecified.
+ // When called from AlterViewAsCommand, it retrieves the collation from
the view's metadata.
Review Comment:
thanks for the comment.
--
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]