You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/10/15 15:37:01 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #30041: [SPARK-32402][SQL][FOLLOW-UP] Use quoted column name for JDBCTableCatalog.alterTable

cloud-fan commented on a change in pull request #30041:
URL: https://github.com/apache/spark/pull/30041#discussion_r505642672



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/v2/jdbc/JDBCTableCatalogSuite.scala
##########
@@ -199,8 +199,8 @@ class JDBCTableCatalogSuite extends QueryTest with SharedSparkSession {
 
   test("alter table ... rename column") {
     withTable("h2.test.alt_table") {
-      sql("CREATE TABLE h2.test.alt_table (ID INTEGER, C0 INTEGER) USING _")
-      sql("ALTER TABLE h2.test.alt_table RENAME COLUMN ID TO C")
+      sql("CREATE TABLE h2.test.alt_table (id INTEGER, C0 INTEGER) USING _")
+      sql("ALTER TABLE h2.test.alt_table RENAME COLUMN id TO C")

Review comment:
       It should still work if we write `ID`, right? Spark normalizes the columns according to the table schema, so case sensitivity flag can still apply. See `ResolveAlterTableChanges`.
   
   It would be better if we can add tests for case insensitive column resolution.




----------------------------------------------------------------
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.

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



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