You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "stevenzwu (via GitHub)" <gi...@apache.org> on 2023/05/23 14:10:40 UTC
[GitHub] [iceberg] stevenzwu commented on a diff in pull request #7685: Spark: Positional deletes creates unpartitioned path
stevenzwu commented on code in PR #7685:
URL: https://github.com/apache/iceberg/pull/7685#discussion_r1202406807
##########
spark/v3.3/spark/src/main/java/org/apache/iceberg/spark/source/SparkPositionDeltaWrite.java:
##########
@@ -435,7 +443,10 @@ public void delete(InternalRow metadata, InternalRow id) throws IOException {
InternalRow partition = metadata.getStruct(partitionOrdinal, partitionRowWrapper.size());
StructProjection partitionProjection = partitionProjections.get(specId);
- partitionProjection.wrap(partitionRowWrapper.wrap(partition));
+
+ if (partitionProjection != null) {
Review Comment:
@RussellSpitzer PR #7507 limited its scope to only nested null struct. Originally, I was also thinking about failing the wrap call if the root struct is null to avoid the null. Ryan made a valid point that get methods can be called before wrap is ever called. Hence we still need the null check. Also Ryan is thinking maybe null root struct value is possible in a collection. Hence we kept the old behavior of StructProjection wrapping a null root value.
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org