Skip to content

Commit

Permalink
Arrow, Core: Remove deprecated code for 1.5.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
ajantha-bhat committed Jan 19, 2024
1 parent fbea707 commit a1b923f
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 721 deletions.
61 changes: 57 additions & 4 deletions .palantir/revapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -874,6 +874,10 @@ acceptedBreaks:
justification: "Static utility class - should not have public constructor"
"1.4.0":
org.apache.iceberg:iceberg-core:
- code: "java.class.defaultSerializationChanged"
old: "class org.apache.iceberg.mapping.NameMapping"
new: "class org.apache.iceberg.mapping.NameMapping"
justification: "Serialization across versions is not guaranteed"
- code: "java.class.noLongerImplementsInterface"
old: "class org.apache.iceberg.AllDataFilesTable"
new: "class org.apache.iceberg.AllDataFilesTable"
Expand Down Expand Up @@ -942,25 +946,74 @@ acceptedBreaks:
old: "class org.apache.iceberg.SnapshotsTable"
new: "class org.apache.iceberg.SnapshotsTable"
justification: "Removing deprecated code"
- code: "java.class.defaultSerializationChanged"
old: "class org.apache.iceberg.mapping.NameMapping"
new: "class org.apache.iceberg.mapping.NameMapping"
justification: "Serialization across versions is not guaranteed"
- code: "java.class.removed"
old: "class org.apache.iceberg.actions.BinPackStrategy"
justification: "Removing deprecated code"
- code: "java.class.removed"
old: "class org.apache.iceberg.actions.SortStrategy"
justification: "Removing deprecated code"
- code: "java.class.removed"
old: "class org.apache.iceberg.rest.RESTSerializers.UpdateRequirementDeserializer"
justification: "Removing deprecated code"
- code: "java.class.removed"
old: "class org.apache.iceberg.rest.RESTSerializers.UpdateRequirementSerializer"
justification: "Removing deprecated code"
- code: "java.class.removed"
old: "class org.apache.iceberg.rest.requests.UpdateRequirementParser"
justification: "Removing deprecated code"
- code: "java.class.removed"
old: "class org.apache.iceberg.rest.requests.UpdateTableRequest.Builder"
justification: "Removing deprecated code"
- code: "java.class.removed"
old: "interface org.apache.iceberg.actions.RewriteStrategy"
justification: "Removing deprecated code"
- code: "java.class.removed"
old: "interface org.apache.iceberg.rest.requests.UpdateTableRequest.UpdateRequirement"
justification: "Removing deprecated code"
- code: "java.field.serialVersionUIDChanged"
new: "field org.apache.iceberg.util.SerializableMap<K, V>.serialVersionUID"
justification: "Serialization is not be used"
- code: "java.method.removed"
old: "method org.apache.iceberg.TableOperations org.apache.iceberg.BaseMetadataTable::operations()"
justification: "Removing deprecated code"
- code: "java.method.removed"
old: "method org.apache.iceberg.encryption.EncryptedOutputFile org.apache.iceberg.io.ClusteredWriter<T,\
\ R>::newOutputFile(org.apache.iceberg.io.OutputFileFactory, org.apache.iceberg.PartitionSpec,\
\ org.apache.iceberg.StructLike) @ org.apache.iceberg.io.ClusteredDataWriter<T>"
justification: "Removing deprecated code"
- code: "java.method.removed"
old: "method org.apache.iceberg.encryption.EncryptedOutputFile org.apache.iceberg.io.ClusteredWriter<T,\
\ R>::newOutputFile(org.apache.iceberg.io.OutputFileFactory, org.apache.iceberg.PartitionSpec,\
\ org.apache.iceberg.StructLike) @ org.apache.iceberg.io.ClusteredEqualityDeleteWriter<T>"
justification: "Removing deprecated code"
- code: "java.method.removed"
old: "method org.apache.iceberg.encryption.EncryptedOutputFile org.apache.iceberg.io.ClusteredWriter<T,\
\ R>::newOutputFile(org.apache.iceberg.io.OutputFileFactory, org.apache.iceberg.PartitionSpec,\
\ org.apache.iceberg.StructLike) @ org.apache.iceberg.io.ClusteredPositionDeleteWriter<T>"
justification: "Removing deprecated code"
- code: "java.method.removed"
old: "method org.apache.iceberg.encryption.EncryptedOutputFile org.apache.iceberg.io.FanoutWriter<T,\
\ R>::newOutputFile(org.apache.iceberg.io.OutputFileFactory, org.apache.iceberg.PartitionSpec,\
\ org.apache.iceberg.StructLike) @ org.apache.iceberg.io.FanoutDataWriter<T>"
justification: "Removing deprecated code"
- code: "java.method.removed"
old: "method org.apache.iceberg.encryption.EncryptedOutputFile org.apache.iceberg.io.FanoutWriter<T,\
\ R>::newOutputFile(org.apache.iceberg.io.OutputFileFactory, org.apache.iceberg.PartitionSpec,\
\ org.apache.iceberg.StructLike) @ org.apache.iceberg.io.FanoutPositionOnlyDeleteWriter<T>"
justification: "Removing deprecated code"
- code: "java.method.removed"
old: "method org.apache.iceberg.rest.requests.UpdateTableRequest.Builder org.apache.iceberg.rest.requests.UpdateTableRequest::builderFor(org.apache.iceberg.TableMetadata)"
justification: "Removing deprecated code"
- code: "java.method.removed"
old: "method org.apache.iceberg.rest.requests.UpdateTableRequest.Builder org.apache.iceberg.rest.requests.UpdateTableRequest::builderForCreate()"
justification: "Removing deprecated code"
- code: "java.method.removed"
old: "method org.apache.iceberg.rest.requests.UpdateTableRequest.Builder org.apache.iceberg.rest.requests.UpdateTableRequest::builderForReplace(org.apache.iceberg.TableMetadata)"
justification: "Removing deprecated code"
- code: "java.method.removed"
old: "method void org.apache.iceberg.PositionDeletesTable.PositionDeletesBatchScan::<init>(org.apache.iceberg.Table,\
\ org.apache.iceberg.Schema, org.apache.iceberg.TableScanContext)"
justification: "Removing deprecated code"
apache-iceberg-0.14.0:
org.apache.iceberg:iceberg-api:
- code: "java.class.defaultSerializationChanged"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,6 @@ public static <T> VectorHolder constantHolder(
return new ConstantVectorHolder<>(icebergField, numRows, constantValue);
}

/** @deprecated since 1.4.0, will be removed in 1.5.0; use typed constant holders instead. */
@Deprecated
public static <T> VectorHolder constantHolder(int numRows, T constantValue) {
return new ConstantVectorHolder<>(numRows, constantValue);
}

public static VectorHolder deletedVectorHolder(int numRows) {
return new DeletedVectorHolder(numRows);
}
Expand All @@ -150,13 +144,6 @@ public ConstantVectorHolder(int numRows) {
this.constantValue = null;
}

/** @deprecated since 1.4.0, will be removed in 1.5.0; use typed constant holders instead. */
@Deprecated
public ConstantVectorHolder(int numRows, T constantValue) {
this.numRows = numRows;
this.constantValue = constantValue;
}

public ConstantVectorHolder(Types.NestedField icebergField, int numRows, T constantValue) {
super(icebergField);
this.numRows = numRows;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -572,12 +572,6 @@ public void close() {
public static class ConstantVectorReader<T> extends VectorizedArrowReader {
private final T value;

/** @deprecated since 1.4.0, will be removed in 1.5.0; use typed constant readers. */
@Deprecated
public ConstantVectorReader(T value) {
this.value = value;
}

public ConstantVectorReader(Types.NestedField icebergField, T value) {
super(icebergField);
this.value = value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,6 @@ protected PositionDeletesBatchScan(Table table, Schema schema) {
super(table, schema, TableScanContext.empty());
}

/** @deprecated the API will be removed in v1.5.0 */
@Deprecated
protected PositionDeletesBatchScan(Table table, Schema schema, TableScanContext context) {
super(table, schema, context);
}

protected PositionDeletesBatchScan(
Table table, Schema schema, TableScanContext context, Expression baseTableFilter) {
super(table, schema, context);
Expand Down
15 changes: 0 additions & 15 deletions core/src/main/java/org/apache/iceberg/io/ClusteredWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import java.util.Set;
import org.apache.iceberg.PartitionSpec;
import org.apache.iceberg.StructLike;
import org.apache.iceberg.encryption.EncryptedOutputFile;
import org.apache.iceberg.relocated.com.google.common.base.Preconditions;
import org.apache.iceberg.relocated.com.google.common.collect.Sets;
import org.apache.iceberg.types.Comparators;
Expand Down Expand Up @@ -131,18 +130,4 @@ public final R result() {
Preconditions.checkState(closed, "Cannot get result from unclosed writer");
return aggregatedResult();
}

/** @deprecated will be removed in 1.5.0 */
@Deprecated
protected EncryptedOutputFile newOutputFile(
OutputFileFactory fileFactory, PartitionSpec spec, StructLike partition) {
Preconditions.checkArgument(
spec.isUnpartitioned() || partition != null,
"Partition must not be null when creating output file for partitioned spec");
if (spec.isUnpartitioned() || partition == null) {
return fileFactory.newOutputFile();
} else {
return fileFactory.newOutputFile(spec, partition);
}
}
}
15 changes: 0 additions & 15 deletions core/src/main/java/org/apache/iceberg/io/FanoutWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import java.util.Map;
import org.apache.iceberg.PartitionSpec;
import org.apache.iceberg.StructLike;
import org.apache.iceberg.encryption.EncryptedOutputFile;
import org.apache.iceberg.relocated.com.google.common.base.Preconditions;
import org.apache.iceberg.relocated.com.google.common.collect.Maps;
import org.apache.iceberg.util.StructLikeMap;
Expand Down Expand Up @@ -94,18 +93,4 @@ public final R result() {
Preconditions.checkState(closed, "Cannot get result from unclosed writer");
return aggregatedResult();
}

/** @deprecated will be removed in 1.5.0 */
@Deprecated
protected EncryptedOutputFile newOutputFile(
OutputFileFactory fileFactory, PartitionSpec spec, StructLike partition) {
Preconditions.checkArgument(
spec.isUnpartitioned() || partition != null,
"Partition must not be null when creating output file for partitioned spec");
if (spec.isUnpartitioned() || partition == null) {
return fileFactory.newOutputFile();
} else {
return fileFactory.newOutputFile(spec, partition);
}
}
}
26 changes: 0 additions & 26 deletions core/src/main/java/org/apache/iceberg/rest/RESTSerializers.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@
import org.apache.iceberg.rest.requests.RegisterTableRequestParser;
import org.apache.iceberg.rest.requests.ReportMetricsRequest;
import org.apache.iceberg.rest.requests.ReportMetricsRequestParser;
import org.apache.iceberg.rest.requests.UpdateRequirementParser;
import org.apache.iceberg.rest.requests.UpdateTableRequest;
import org.apache.iceberg.rest.requests.UpdateTableRequest.UpdateRequirement;
import org.apache.iceberg.rest.requests.UpdateTableRequestParser;
import org.apache.iceberg.rest.responses.ErrorResponse;
import org.apache.iceberg.rest.responses.ErrorResponseParser;
Expand Down Expand Up @@ -88,8 +86,6 @@ public static void registerAll(ObjectMapper mapper) {
.addDeserializer(MetadataUpdate.class, new MetadataUpdateDeserializer())
.addSerializer(TableMetadata.class, new TableMetadataSerializer())
.addDeserializer(TableMetadata.class, new TableMetadataDeserializer())
.addSerializer(UpdateRequirement.class, new UpdateRequirementSerializer())
.addDeserializer(UpdateRequirement.class, new UpdateRequirementDeserializer())
.addSerializer(org.apache.iceberg.UpdateRequirement.class, new UpdateReqSerializer())
.addDeserializer(org.apache.iceberg.UpdateRequirement.class, new UpdateReqDeserializer())
.addSerializer(OAuthTokenResponse.class, new OAuthTokenResponseSerializer())
Expand Down Expand Up @@ -120,28 +116,6 @@ public static void registerAll(ObjectMapper mapper) {
mapper.registerModule(module);
}

/** @deprecated will be removed in 1.5.0, use {@link UpdateReqDeserializer} instead. */
@Deprecated
public static class UpdateRequirementDeserializer extends JsonDeserializer<UpdateRequirement> {
@Override
public UpdateRequirement deserialize(JsonParser p, DeserializationContext ctxt)
throws IOException {
JsonNode node = p.getCodec().readTree(p);
return UpdateRequirementParser.fromJson(node);
}
}

/** @deprecated will be removed in 1.5.0, use {@link UpdateReqSerializer} instead. */
@Deprecated
public static class UpdateRequirementSerializer extends JsonSerializer<UpdateRequirement> {
@Override
public void serialize(
UpdateRequirement value, JsonGenerator gen, SerializerProvider serializers)
throws IOException {
UpdateRequirementParser.toJson(value, gen);
}
}

static class UpdateReqDeserializer
extends JsonDeserializer<org.apache.iceberg.UpdateRequirement> {
@Override
Expand Down
Loading

0 comments on commit a1b923f

Please sign in to comment.