Skip to content

Commit

Permalink
return null instead of empty list
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanck committed Oct 14, 2023
1 parent 11cd94f commit 22ed9e8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions core/src/main/java/org/apache/iceberg/BaseFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import org.apache.avro.specific.SpecificData;
import org.apache.iceberg.avro.AvroSchemaUtil;
import org.apache.iceberg.relocated.com.google.common.base.MoreObjects;
import org.apache.iceberg.relocated.com.google.common.collect.ImmutableList;
import org.apache.iceberg.relocated.com.google.common.collect.Lists;
import org.apache.iceberg.relocated.com.google.common.primitives.Ints;
import org.apache.iceberg.relocated.com.google.common.primitives.Longs;
Expand Down Expand Up @@ -463,7 +462,7 @@ public ByteBuffer keyMetadata() {

@Override
public List<Long> splitOffsets() {
return splitOffsets == null ? ImmutableList.of() : Longs.asList(splitOffsets);
return splitOffsets == null ? null : Longs.asList(splitOffsets);
}

long[] splitOffsetArray() {
Expand All @@ -472,7 +471,7 @@ long[] splitOffsetArray() {

@Override
public List<Integer> equalityFieldIds() {
return equalityIds == null ? ImmutableList.of() : Ints.asList(equalityIds);
return equalityIds == null ? null : Ints.asList(equalityIds);
}

@Override
Expand Down

0 comments on commit 22ed9e8

Please sign in to comment.