Skip to content

Commit

Permalink
review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
nastra committed Dec 9, 2024
1 parent c712d4b commit 36e65b2
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import org.apache.iceberg.relocated.com.google.common.collect.ImmutableList;
import org.apache.iceberg.relocated.com.google.common.collect.Lists;
import org.apache.iceberg.types.Types;
import org.apache.iceberg.util.ScanTaskUtil;
import org.apache.spark.sql.catalyst.InternalRow;
import org.apache.spark.sql.catalyst.expressions.GenericInternalRow;
import org.apache.spark.unsafe.types.UTF8String;
Expand Down Expand Up @@ -67,6 +68,7 @@ public boolean hasNext() {
}

@Override
@SuppressWarnings("checkstyle:CyclomaticComplexity")
public InternalRow next() {
long position = positions.next();

Expand All @@ -86,6 +88,10 @@ public InternalRow next() {
rowValues.add(idToConstant.get(MetadataColumns.SPEC_ID_COLUMN_ID));
} else if (fieldId == MetadataColumns.FILE_PATH_COLUMN_ID) {
rowValues.add(idToConstant.get(MetadataColumns.FILE_PATH_COLUMN_ID));
} else if (null != projection.findField(MetadataColumns.CONTENT_OFFSET.fieldId())) {
rowValues.add(deleteFile.contentOffset());
} else if (null != projection.findField(MetadataColumns.CONTENT_SIZE_IN_BYTES.fieldId())) {
rowValues.add(ScanTaskUtil.contentSizeInBytes(deleteFile));
}
}

Expand Down

0 comments on commit 36e65b2

Please sign in to comment.