Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions api/src/main/java/org/apache/iceberg/EmptyStructLike.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@

import java.io.Serializable;

class EmptyStructLike implements StructLike, Serializable {
public class EmptyStructLike implements StructLike, Serializable {

private static final EmptyStructLike INSTANCE = new EmptyStructLike();

private EmptyStructLike() {}

static EmptyStructLike get() {
public static EmptyStructLike get() {
return INSTANCE;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,14 @@ private static void checkMagic(byte[] data, int offset) {
}
}

public long dataSize() {
try {
return fileSize - footerSize() - 4L;
} catch (IOException e) {
throw new UncheckedIOException(e);
}
}

private int footerSize() throws IOException {
if (knownFooterSize == null) {
Preconditions.checkState(
Expand Down
Loading