cloud-fan commented on code in PR #45019:
URL: https://github.com/apache/spark/pull/45019#discussion_r1491966372


##########
sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2SQLSuite.scala:
##########
@@ -1735,6 +1735,15 @@ class DataSourceV2SQLSuiteV1Filter
     }
   }
 
+  test("SPARK-46972: asymmetrical replacement for char/varchar in 
V2SessionCatalog.createTable") {
+    // unset this config to use the default v2 session catalog.
+    spark.conf.unset(V2_SESSION_CATALOG_IMPLEMENTATION.key)
+    withTable("t") {
+      sql(s"CREATE TABLE t(c char(1), v varchar(2)) USING $v2Source")
+      assert(!spark.table("t").isEmpty)

Review Comment:
   I think we should not trigger an actual scan. The data schema (int) is 
incompatible with char, and the scan behavior is kind of undefined. It should 
be good enough to run the CREATE TABLE command in this test case.



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

Reply via email to