huaxingao commented on code in PR #50246: URL: https://github.com/apache/spark/pull/50246#discussion_r1992558449
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/RewriteRowLevelCommand.scala: ########## @@ -273,9 +273,8 @@ trait RewriteRowLevelCommand extends Rule[LogicalPlan] { outputs: Seq[Seq[Expression]], colOrdinals: Seq[Int], attrs: Seq[Attribute]): ProjectingInternalRow = { - val schema = StructType(attrs.zipWithIndex.map { case (attr, index) => - val nullable = outputs.exists(output => output(colOrdinals(index)).nullable) - StructField(attr.name, attr.dataType, nullable, attr.metadata) + val schema = StructType(attrs.zipWithIndex.map { case (attr, _) => + StructField(attr.name, attr.dataType, attr.nullable, attr.metadata) Review Comment: @aokolnychyi I got quite some test failures in iceberg/spark 4.0 integration because the nullable don't match. If I change the code to use `attr.nullable`, those tests will pass. Does the above change look correct to you? Thanks! -- 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. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org