Skip to content

Commit

Permalink
Core: Remove deprecated code in DeleteFileIndex (#9166)
Browse files Browse the repository at this point in the history
  • Loading branch information
aokolnychyi authored Nov 28, 2023
1 parent d2ab709 commit d247b20
Showing 1 changed file with 0 additions and 41 deletions.
41 changes: 0 additions & 41 deletions core/src/main/java/org/apache/iceberg/DeleteFileIndex.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,6 @@ class DeleteFileIndex {
private final boolean isEmpty;
private final boolean useColumnStatsFiltering;

/** @deprecated since 1.4.0, will be removed in 1.5.0. */
@Deprecated
DeleteFileIndex(
Map<Integer, PartitionSpec> specs,
long[] globalSeqs,
DeleteFile[] globalDeletes,
Map<Pair<Integer, StructLikeWrapper>, Pair<long[], DeleteFile[]>> deletesByPartition) {
this(specs, index(specs, globalSeqs, globalDeletes), index(specs, deletesByPartition), true);
}

private DeleteFileIndex(
Map<Integer, PartitionSpec> specs,
DeleteFileGroup globalDeletes,
Expand Down Expand Up @@ -374,37 +364,6 @@ private static boolean containsNull(Map<Integer, Long> nullValueCounts, Types.Ne
return nullValueCount > 0;
}

private static DeleteFileGroup index(
Map<Integer, PartitionSpec> specs, Pair<long[], DeleteFile[]> pairs) {
return index(specs, pairs.first(), pairs.second());
}

private static DeleteFileGroup index(
Map<Integer, PartitionSpec> specs, long[] seqs, DeleteFile[] files) {
if (files == null || files.length == 0) {
return null;
}

IndexedDeleteFile[] indexedGlobalDeleteFiles = new IndexedDeleteFile[files.length];

for (int pos = 0; pos < files.length; pos++) {
DeleteFile file = files[pos];
PartitionSpec spec = specs.get(file.specId());
long applySequenceNumber = seqs[pos];
indexedGlobalDeleteFiles[pos] = new IndexedDeleteFile(spec, file, applySequenceNumber);
}

return new DeleteFileGroup(seqs, indexedGlobalDeleteFiles);
}

private static Map<Pair<Integer, StructLikeWrapper>, DeleteFileGroup> index(
Map<Integer, PartitionSpec> specs,
Map<Pair<Integer, StructLikeWrapper>, Pair<long[], DeleteFile[]>> deletesByPartition) {
Map<Pair<Integer, StructLikeWrapper>, DeleteFileGroup> indexed = Maps.newHashMap();
deletesByPartition.forEach((key, value) -> indexed.put(key, index(specs, value)));
return indexed;
}

static Builder builderFor(FileIO io, Iterable<ManifestFile> deleteManifests) {
return new Builder(io, Sets.newHashSet(deleteManifests));
}
Expand Down

0 comments on commit d247b20

Please sign in to comment.