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/10/14 02:37:52 UTC

[GitHub] [spark] dongjoon-hyun commented on a change in pull request #30033: [SPARK-33136][SQL] Fix mistakenly swapped parameter in V2WriteCommand.outputResolved

dongjoon-hyun commented on a change in pull request #30033:
URL: https://github.com/apache/spark/pull/30033#discussion_r504365454



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/v2Commands.scala
##########
@@ -45,7 +45,7 @@ trait V2WriteCommand extends Command {
           case (inAttr, outAttr) =>
             // names and types must match, nullability must be compatible
             inAttr.name == outAttr.name &&
-              DataType.equalsIgnoreCompatibleNullability(outAttr.dataType, inAttr.dataType) &&
+              DataType.equalsIgnoreCompatibleNullability(inAttr.dataType, outAttr.dataType) &&

Review comment:
       Hi, @HeartSaVioR . This looks like the same with `branch-2.4` but the issue is reported at 3.0.0+. Could you confirm that this is 3.0.0-only issue or not?
   ```scala
     override lazy val resolved: 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 &&
                   DataType.equalsIgnoreCompatibleNullability(outAttr.dataType, inAttr.dataType) &&
                   (outAttr.nullable || !inAttr.nullable)
           }
     }
   ```




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



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