chengxianglibra commented on issue #8126:
URL: https://github.com/apache/iceberg/issues/8126#issuecomment-1681928667

   @aokolnychyi It seems this bug is introduced by 
[#7646](https://github.com/apache/iceberg/pull/7646). 
RewriteRowLevelIcebergCommand::buildMergingOutput would transform attribute 
nullable property from `true` to `false` if attribute is not in outputs, and in 
RewriteMergeIntoTable::buildReplaceDataPlan, #7646 update the following code
   `val matchedOutputs = matchedActions.map(actionOutput(_, metadataAttrs)) :+ 
readAttrs`
   to
   `val matchedOutputs = matchedActions.map(matchedActionOutput(_, 
metadataAttrs))`
   When outputs is empty and the remaining row after deletion has null 
value(such as the previous test case), all attributes nullable property is set 
to `true`, spark generated code does not check nullable of field value, which 
finally lead to this NPE.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to