huaxingao commented on a change in pull request #30041:
URL: https://github.com/apache/spark/pull/30041#discussion_r505202427
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/v2/jdbc/JDBCTableCatalogSuite.scala
##########
@@ -178,15 +178,15 @@ class JDBCTableCatalogSuite extends QueryTest with
SharedSparkSession {
.add("C1", IntegerType)
.add("C2", StringType)
assert(t.schema === expectedSchema)
- sql("ALTER TABLE h2.test.alt_table ADD COLUMNS (C3 DOUBLE)")
+ sql("ALTER TABLE h2.test.alt_table ADD COLUMNS (c3 DOUBLE)")
t = spark.table("h2.test.alt_table")
- expectedSchema = expectedSchema.add("C3", DoubleType)
+ expectedSchema = expectedSchema.add("c3", DoubleType)
Review comment:
Without fix (with unquoted column name), `assert(t.schema ===
expectedSchema)` throws the following Exception:
```
org.scalatest.exceptions.TestFailedException:
StructType(StructField(ID,IntegerType,true), StructField(C1,IntegerType,true),
StructField(C2,StringType,true), StructField(C3,DoubleType,true)) did not equal
StructType(StructField(ID,IntegerType,true), StructField(C1,IntegerType,true),
StructField(C2,StringType,true), StructField(c3,DoubleType,true))
at
org.scalatest.Assertions.newAssertionFailedException(Assertions.scala:472)
```
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]