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/04/01 19:46:36 UTC

[GitHub] [spark] rdblue commented on a change in pull request #24233: [SPARK-26356][SQL] remove SaveMode from data source v2

rdblue commented on a change in pull request #24233: [SPARK-26356][SQL] remove SaveMode from data source v2
URL: https://github.com/apache/spark/pull/24233#discussion_r271022687
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/basicLogicalOperators.scala
 ##########
 @@ -376,14 +376,20 @@ trait V2WriteCommand extends Command {
   override lazy val resolved: Boolean = outputResolved
 
   def outputResolved: Boolean = {
-    table.resolved && query.resolved && query.output.size == table.output.size &&
-        query.output.zip(table.output).forall {
-          case (inAttr, outAttr) =>
-            // names and types must match, nullability must be compatible
-            inAttr.name == outAttr.name &&
+    table.resolved && query.resolved && {
+      // When the table schema is empty, skip the schema check.
+      // TODO: introduce a table capability to disable schema check.
+      table.schema.isEmpty || {
 
 Review comment:
   Why is this necessary for removing `SaveMode`? It seems unrelated.
   
   I think that we should add the table capability instead of adding this check. What does this unblock?

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