cloud-fan commented on a change in pull request #25104: [SPARK-28341][SQL] 
remove session catalog config
URL: https://github.com/apache/spark/pull/25104#discussion_r302336524
 
 

 ##########
 File path: 
sql/core/src/test/scala/org/apache/spark/sql/sources/v2/DataSourceV2SQLSuite.scala
 ##########
 @@ -174,26 +180,17 @@ class DataSourceV2SQLSuite extends QueryTest with 
SharedSQLContext with BeforeAn
   }
 
   test("CreateTableAsSelect: use v2 plan and session catalog when provider is 
v2") {
-    spark.sql(s"CREATE TABLE table_name USING $orc2 AS SELECT id, data FROM 
source")
-
-    val testCatalog = spark.catalog("session").asTableCatalog
-    val table = testCatalog.loadTable(Identifier.of(Array(), "table_name"))
-
-    assert(table.name == "session.table_name")
-    assert(table.partitioning.isEmpty)
-    assert(table.properties == Map("provider" -> orc2).asJava)
-    assert(table.schema == new StructType()
-        .add("id", LongType, nullable = false)
-        .add("data", StringType))
-
-    val rdd = 
spark.sparkContext.parallelize(table.asInstanceOf[InMemoryTable].rows)
-    checkAnswer(spark.internalCreateDataFrame(rdd, table.schema), 
spark.table("source"))
+    // TODO: support write table from v2 session catalog.
 
 Review comment:
   Note that, this is never supported. The test can pass before because we set 
a fake session catalog which returns writable tables.

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