somani commented on a change in pull request #34317:
URL: https://github.com/apache/spark/pull/34317#discussion_r731895061
##########
File path:
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveDDLSuite.scala
##########
@@ -3025,4 +3025,49 @@ class HiveDDLSuite
assert(errMsg2.contains("Cannot use interval type in the table schema"))
}
}
+
+ test("SPARK-37046: Alter view should preserve column case with view
definition change") {
+ withView("v") {
+ // Changing view definition should preserve column case
+ spark.sql("CREATE VIEW v AS SELECT 1 AS A, 1 AS B")
+ val df = spark.table("v")
+ assert("A".equals(df.schema.fields(0).name))
+ assert("B".equals(df.schema.fields(1).name))
Review comment:
Done.
--
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]