amogh-jahagirdar commented on code in PR #7011:
URL: https://github.com/apache/iceberg/pull/7011#discussion_r1128156239
##########
core/src/main/java/org/apache/iceberg/FileMetadata.java:
##########
@@ -192,6 +196,15 @@ public Builder withMetrics(Metrics metrics) {
return this;
}
+ public Builder withSplitOffsets(List<Long> offsets) {
+ if (offsets != null) {
+ this.splitOffsets = KryoUtil.copyList(offsets);
+ } else {
+ this.splitOffsets = null;
+ }
Review Comment:
Do we need this else block since `this.splitOffsets` already be null?
##########
spark/v3.3/spark/src/test/java/org/apache/iceberg/spark/source/TestPositionDeletesTable.java:
##########
@@ -230,9 +230,17 @@ public void testSplitTasks() throws IOException {
Table deleteTable =
MetadataTableUtils.createMetadataTableInstance(tab,
MetadataTableType.POSITION_DELETES);
- Assert.assertTrue(
- "Position delete scan should produce more than one split",
- Iterables.size(deleteTable.newBatchScan().planTasks()) > 1);
+
+ if (format.equals(FileFormat.AVRO)) {
+ Assert.assertTrue(
+ "Position delete scan should produce more than one split",
+ Iterables.size(deleteTable.newBatchScan().planTasks()) > 1);
+ } else {
+ Assert.assertEquals(
+ "Position delete scan should produce one split",
+ 1,
+ Iterables.size(deleteTable.newBatchScan().planTasks()));
+ }
Review Comment:
naive question, why does this depend on the file format, why is Avro a
special case?
##########
core/src/main/java/org/apache/iceberg/FileMetadata.java:
##########
@@ -57,6 +59,8 @@ public static class Builder {
private ByteBuffer keyMetadata = null;
private Integer sortOrderId = null;
+ private List<Long> splitOffsets = null;
+
Review Comment:
Just a nit, could we move the field just below `sortOrderId` and avoid the
unnecessary new line
--
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]