nastra commented on code in PR #12135:
URL: https://github.com/apache/iceberg/pull/12135#discussion_r1935379994


##########
spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/DVIterator.java:
##########
@@ -84,6 +84,9 @@ public InternalRow next() {
           rowValues.add(deleteFile.contentOffset());
         } else if (fieldId == MetadataColumns.CONTENT_SIZE_IN_BYTES_COLUMN_ID) 
{
           rowValues.add(ScanTaskUtil.contentSizeInBytes(deleteFile));
+        } else if (fieldId == MetadataColumns.DELETE_FILE_ROW_FIELD_ID) {
+          // DVs don't track the row that was deleted
+          rowValues.add(null);

Review Comment:
   this fixes an issue when reading from the `.position_deletes` table when the 
underlying table is V3. By default, the schema includes 
https://github.com/apache/iceberg/blob/026a9b00459ae458eb4c6c620c78742dc43a00e8/core/src/main/java/org/apache/iceberg/PositionDeletesTable.java#L123
 which we don't track for DVs, thus we're returning null here



-- 
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-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to