Skip to content
Open
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
464 changes: 359 additions & 105 deletions .palantir/revapi.yml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public CloseableIterable<ScanTaskGroup<ScanTask>> planTasks() {
}

private List<ManifestFile> findMatchingDataManifests(Snapshot snapshot) {
List<ManifestFile> dataManifests = snapshot.dataManifests(io());
List<ManifestFile> dataManifests = snapshot.dataManifests(fileIO().get());
scanMetrics().totalDataManifests().increment(dataManifests.size());

List<ManifestFile> matchingDataManifests = filterManifests(dataManifests);
Expand All @@ -205,7 +205,7 @@ private List<ManifestFile> findMatchingDataManifests(Snapshot snapshot) {
}

private List<ManifestFile> findMatchingDeleteManifests(Snapshot snapshot) {
List<ManifestFile> deleteManifests = snapshot.deleteManifests(io());
List<ManifestFile> deleteManifests = snapshot.deleteManifests(fileIO().get());
scanMetrics().totalDeleteManifests().increment(deleteManifests.size());

List<ManifestFile> matchingDeleteManifests = filterManifests(deleteManifests);
Expand Down Expand Up @@ -293,7 +293,7 @@ private CompletableFuture<DeleteFileIndex> newDeletesFuture(
}

private DeleteFileIndex planDeletesLocally(List<ManifestFile> deleteManifests) {
DeleteFileIndex.Builder builder = DeleteFileIndex.builderFor(io(), deleteManifests);
DeleteFileIndex.Builder builder = DeleteFileIndex.builderFor(fileIO().get(), deleteManifests);

if (shouldPlanWithExecutor() && deleteManifests.size() > 1) {
builder.planWith(planExecutor());
Expand Down
8 changes: 0 additions & 8 deletions core/src/main/java/org/apache/iceberg/BaseScan.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,6 @@ public Table table() {
return table;
}

/**
* @deprecated since 1.11.0, will be removed in 1.12.0; use {@link BaseScan#fileIO()} instead.
*/
@Deprecated
protected FileIO io() {
return table.io();
}

@Override
public Supplier<FileIO> fileIO() {
return table::io;
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/org/apache/iceberg/DataScan.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ protected ManifestGroup newManifestGroup(
boolean withColumnStats) {

ManifestGroup manifestGroup =
new ManifestGroup(io(), dataManifests, deleteManifests)
new ManifestGroup(fileIO().get(), dataManifests, deleteManifests)
.caseSensitive(isCaseSensitive())
.select(withColumnStats ? SCAN_WITH_STATS_COLUMNS : SCAN_COLUMNS)
.filterData(filter())
Expand Down
42 changes: 0 additions & 42 deletions core/src/main/java/org/apache/iceberg/ManifestFiles.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,39 +108,6 @@ public static CloseableIterable<String> readPaths(
entry -> entry.file().location());
}

/**
* Returns a {@link CloseableIterable} of file paths in the {@link ManifestFile}.
*
* @param manifest a ManifestFile
* @param io a FileIO
* @return a manifest reader
* @deprecated since 1.11.0, will be removed in 1.12.0; use {@link #readPaths(ManifestFile,
* FileIO, Map)} instead.
*/
@Deprecated
public static CloseableIterable<String> readPaths(ManifestFile manifest, FileIO io) {
return readPaths(manifest, io, null);
}

/**
* Returns a new {@link ManifestReader} for a {@link ManifestFile}.
*
* <p><em>Note:</em> Callers should use {@link ManifestFiles#read(ManifestFile, FileIO, Map)} to
* ensure the schema used by filters is the latest table schema. This should be used only when
* reading a manifest without filters.
*
* @param manifest a ManifestFile
* @param io a FileIO
* @return a manifest reader
* @deprecated since 1.11.0, will be removed in 1.12.0; use {@link #read(ManifestFile, FileIO,
* Map)} instead. Reading partition specs from manifest file metadata will not be supported
* for non-Avro manifest formats.
*/
@Deprecated
public static ManifestReader<DataFile> read(ManifestFile manifest, FileIO io) {
return read(manifest, io, null);
}

/**
* Returns a new {@link ManifestReader} for a {@link ManifestFile}.
*
Expand Down Expand Up @@ -437,15 +404,6 @@ public static ManifestFile decode(byte[] manifestData) throws IOException {
return AvroEncoderUtil.decode(manifestData);
}

/**
* @deprecated since 1.11.0, will be removed in 1.12.0; use {@link #open(ManifestFile, FileIO,
* Map)} instead.
*/
@Deprecated
static ManifestReader<?> open(ManifestFile manifest, FileIO io) {
return open(manifest, io, null);
}

static ManifestReader<?> open(
ManifestFile manifest, FileIO io, Map<Integer, PartitionSpec> specsById) {
switch (manifest.content()) {
Expand Down
30 changes: 0 additions & 30 deletions core/src/main/java/org/apache/iceberg/MetricsConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import javax.annotation.concurrent.Immutable;
import org.apache.iceberg.MetricsModes.MetricsMode;
import org.apache.iceberg.exceptions.ValidationException;
import org.apache.iceberg.relocated.com.google.common.base.Joiner;
import org.apache.iceberg.relocated.com.google.common.collect.ImmutableMap;
import org.apache.iceberg.relocated.com.google.common.collect.Maps;
import org.apache.iceberg.relocated.com.google.common.collect.Sets;
Expand All @@ -49,7 +48,6 @@
public final class MetricsConfig implements Serializable {

private static final Logger LOG = LoggerFactory.getLogger(MetricsConfig.class);
private static final Joiner DOT = Joiner.on('.');

// Disable metrics by default for wide tables to prevent excessive metadata
private static final MetricsMode DEFAULT_MODE =
Expand Down Expand Up @@ -100,34 +98,6 @@ public static MetricsConfig forTable(Table table) {
return from(table.properties(), table.schema(), table.sortOrder());
}

/**
* Creates a metrics config for a position delete file.
*
* @param table an Iceberg table
* @deprecated This method is deprecated as of version 1.11.0 and will be removed in 1.12.0.
* Position deletes that include row data are no longer supported. Use {@link
* #forPositionDelete()} instead.
*/
@Deprecated
public static MetricsConfig forPositionDelete(Table table) {
ImmutableMap.Builder<String, MetricsMode> columnModes = ImmutableMap.builder();

columnModes.put(MetadataColumns.DELETE_FILE_PATH.name(), MetricsModes.Full.get());
columnModes.put(MetadataColumns.DELETE_FILE_POS.name(), MetricsModes.Full.get());

MetricsConfig tableConfig = forTable(table);

MetricsMode defaultMode = tableConfig.defaultMode;
tableConfig.columnModes.forEach(
(columnAlias, mode) -> {
String positionDeleteColumnAlias =
DOT.join(MetadataColumns.DELETE_FILE_ROW_FIELD_NAME, columnAlias);
columnModes.put(positionDeleteColumnAlias, mode);
});

return new MetricsConfig(columnModes.build(), defaultMode);
}

static Set<Integer> limitFieldIds(Schema schema, int limit) {
return TypeUtil.visit(
schema,
Expand Down
Loading
Loading