Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core: Store split offset for delete files #7011

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
remove kryo util as offsets are long[]
  • Loading branch information
Prashant Singh committed Mar 23, 2023
commit a5a5f5b5e9b1bd74365b348e632d2446414af9a5
6 changes: 3 additions & 3 deletions core/src/main/java/org/apache/iceberg/DataFiles.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
import org.apache.iceberg.hadoop.HadoopInputFile;
import org.apache.iceberg.io.InputFile;
import org.apache.iceberg.relocated.com.google.common.base.Preconditions;
import org.apache.iceberg.relocated.com.google.common.collect.ImmutableList;
import org.apache.iceberg.types.Conversions;
import org.apache.iceberg.util.ByteBuffers;
import org.apache.iceberg.util.KryoUtil;

public class DataFiles {

Expand Down Expand Up @@ -179,7 +179,7 @@ public Builder copy(DataFile toCopy) {
this.keyMetadata =
toCopy.keyMetadata() == null ? null : ByteBuffers.copy(toCopy.keyMetadata());
this.splitOffsets =
toCopy.splitOffsets() == null ? null : KryoUtil.copyList(toCopy.splitOffsets());
toCopy.splitOffsets() == null ? null : ImmutableList.copyOf(toCopy.splitOffsets());
this.sortOrderId = toCopy.sortOrderId();
return this;
}
Expand Down Expand Up @@ -262,7 +262,7 @@ public Builder withMetrics(Metrics metrics) {

public Builder withSplitOffsets(List<Long> offsets) {
if (offsets != null) {
this.splitOffsets = KryoUtil.copyList(offsets);
this.splitOffsets = ImmutableList.copyOf(offsets);
} else {
this.splitOffsets = null;
}
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/java/org/apache/iceberg/FileMetadata.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
import org.apache.iceberg.hadoop.HadoopInputFile;
import org.apache.iceberg.io.InputFile;
import org.apache.iceberg.relocated.com.google.common.base.Preconditions;
import org.apache.iceberg.relocated.com.google.common.collect.ImmutableList;
import org.apache.iceberg.util.ByteBuffers;
import org.apache.iceberg.util.KryoUtil;

public class FileMetadata {
private FileMetadata() {}
Expand Down Expand Up @@ -197,7 +197,7 @@ public Builder withMetrics(Metrics metrics) {

public Builder withSplitOffsets(List<Long> offsets) {
if (offsets != null) {
this.splitOffsets = KryoUtil.copyList(offsets);
this.splitOffsets = ImmutableList.copyOf(offsets);
} else {
this.splitOffsets = null;
}
Expand Down
39 changes: 0 additions & 39 deletions core/src/main/java/org/apache/iceberg/util/KryoUtil.java

This file was deleted.