cloud-fan commented on a change in pull request #26894: [SPARK-30094][SQL] 
Apply current namespace for the single-part table name
URL: https://github.com/apache/spark/pull/26894#discussion_r358079795
 
 

 ##########
 File path: 
sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2SQLSuite.scala
 ##########
 @@ -1914,6 +1914,21 @@ class DataSourceV2SQLSuite
     }
   }
 
+  test("SPARK-30094: current namespace is used during table resolution") {
+    // unset this config to use the default v2 session catalog.
+    spark.conf.unset(V2_SESSION_CATALOG_IMPLEMENTATION.key)
+
+    withTable("spark_catalog.t", "testcat.ns.t") {
+      sql("CREATE TABLE t USING parquet AS SELECT data FROM source")
+      sql("CREATE TABLE testcat.ns.t USING parquet AS SELECT id FROM source")
 
 Review comment:
   can we use different data for these 2 tables? e.g. `CREATE TABLE t ... AS 
SELECT 1` and `CREATE TABLE testcat.ns.t ... AS SELECT 2`

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to