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 2020/03/27 17:14:57 UTC

[GitHub] [spark] rdblue commented on a change in pull request #27992: [SPARK-31230][SQL] Use statement plans in DataFrameWriter(V2)

rdblue commented on a change in pull request #27992: [SPARK-31230][SQL] Use statement plans in DataFrameWriter(V2)
URL: https://github.com/apache/spark/pull/27992#discussion_r399419274
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameWriterV2.scala
 ##########
 @@ -120,19 +117,18 @@ final class DataFrameWriterV2[T] private[sql](table: String, ds: Dataset[T])
   }
 
   override def create(): Unit = {
-    // create and replace could alternatively create ParsedPlan statements, like
-    // `CreateTableFromDataFrameStatement(UnresolvedRelation(tableName), ...)`, to keep the catalog
-    // resolution logic in the analyzer.
     runCommand("create") {
-      CreateTableAsSelect(
-        catalog,
-        identifier,
-        partitioning.getOrElse(Seq.empty),
+      CreateTableAsSelectStatement(
 
 Review comment:
   Okay, I see that we reuse options for both write options and table options.
   
   Do we want to separate those in the v2 API? I think we only mix them in the v1 API by accident. And we set table properties using `tableProperty`. Seems reasonable to separate table options and use `tableOption` or `storageOption` to set them.

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