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 2019/08/21 19:59:07 UTC

[GitHub] [spark] keypointt commented on a change in pull request #25536: [SPARK-28837][SQL] CTAS/RTAS should use nullable schema

keypointt commented on a change in pull request #25536: [SPARK-28837][SQL] CTAS/RTAS should use nullable schema
URL: https://github.com/apache/spark/pull/25536#discussion_r316375071
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/sources/v2/DataSourceV2SQLSuite.scala
 ##########
 @@ -500,6 +499,32 @@ class DataSourceV2SQLSuite extends QueryTest with SharedSparkSession with Before
     assert(t.isInstanceOf[UnresolvedTable], "V1 table wasn't returned as an unresolved table")
   }
 
+  test("CreateTableAsSelect: nullable schema") {
+    val basicCatalog = catalog("testcat").asTableCatalog
+    val atomicCatalog = catalog("testcat_atomic").asTableCatalog
+    val basicIdentifier = "testcat.table_name"
+    val atomicIdentifier = "testcat_atomic.table_name"
+
+    Seq((basicCatalog, basicIdentifier), (atomicCatalog, atomicIdentifier)).foreach {
+      case (catalog, identifier) =>
+        spark.sql(s"CREATE TABLE $identifier USING foo AS SELECT 1 i")
+
+        val table = catalog.loadTable(Identifier.of(Array(), "table_name"))
 
 Review comment:
   in your PR https://github.com/apache/spark/pull/25507/files `DataSourceV2DataFrameSessionCatalogSuite.scala`, there is a class variable `v2Format` being referenced by all test cases
   
   ```
   protected val v2Format: String = classOf[InMemoryTableProvider].getName
   ```
   
   so I thought it's a style convention...

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


With regards,
Apache Git Services

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