diff --git a/.palantir/revapi.yml b/.palantir/revapi.yml index fde647c85be3..6c9659fdcd34 100644 --- a/.palantir/revapi.yml +++ b/.palantir/revapi.yml @@ -406,6 +406,10 @@ acceptedBreaks: justification: "Removing deprecations for 1.2.0" "1.2.0": org.apache.iceberg:iceberg-api: + - code: "java.class.defaultSerializationChanged" + old: "class org.apache.iceberg.types.Types.NestedField" + new: "class org.apache.iceberg.types.Types.NestedField" + justification: "Serialization across versions is not supported" - code: "java.field.constantValueChanged" old: "field org.apache.iceberg.actions.RewriteDataFiles.MAX_CONCURRENT_FILE_GROUP_REWRITES_DEFAULT" new: "field org.apache.iceberg.actions.RewriteDataFiles.MAX_CONCURRENT_FILE_GROUP_REWRITES_DEFAULT" @@ -735,10 +739,6 @@ acceptedBreaks: old: "class org.apache.iceberg.PartitionKey" new: "class org.apache.iceberg.PartitionKey" justification: "Serialization across versions is not supported" - - code: "java.class.defaultSerializationChanged" - old: "class org.apache.iceberg.types.Types.NestedField" - new: "class org.apache.iceberg.types.Types.NestedField" - justification: "Serialization across versions is not supported" - code: "java.class.removed" old: "interface org.apache.iceberg.Rollback" justification: "Deprecations for 1.0 release" @@ -748,9 +748,6 @@ acceptedBreaks: - code: "java.method.addedToInterface" new: "method java.util.List org.apache.iceberg.Table::statisticsFiles()" justification: "new API method" - - code: "java.method.addedToInterface" - new: "method org.apache.iceberg.TableScan org.apache.iceberg.TableScan::useRef(java.lang.String)" - justification: "Adding table scan APIs to support scanning from refs" - code: "java.method.removed" old: "method java.lang.Iterable org.apache.iceberg.Snapshot::addedFiles()" justification: "Deprecations for 1.0 release" diff --git a/core/src/main/java/org/apache/iceberg/avro/ValueReaders.java b/core/src/main/java/org/apache/iceberg/avro/ValueReaders.java index ab3c07326e83..85b3092dde8e 100644 --- a/core/src/main/java/org/apache/iceberg/avro/ValueReaders.java +++ b/core/src/main/java/org/apache/iceberg/avro/ValueReaders.java @@ -25,7 +25,14 @@ import java.math.BigInteger; import java.nio.ByteBuffer; import java.nio.ByteOrder; -import java.util.*; +import java.util.Collection; +import java.util.Deque; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; import java.util.function.Supplier; import org.apache.avro.Schema; import org.apache.avro.generic.GenericData; @@ -38,6 +45,7 @@ import org.apache.iceberg.data.IdentityPartitionConverters; import org.apache.iceberg.relocated.com.google.common.collect.Lists; import org.apache.iceberg.relocated.com.google.common.collect.Maps; +import org.apache.iceberg.relocated.com.google.common.collect.Sets; import org.apache.iceberg.types.Types; import org.apache.iceberg.util.UUIDUtil; @@ -665,7 +673,7 @@ public S read(Decoder decoder, Object reuse) throws IOException { S struct = reuseOrCreate(reuse); if (decoder instanceof ResolvingDecoder) { - Set existingFieldPositionsSet = new HashSet<>(); + Set existingFieldPositionsSet = Sets.newHashSet(); // This may not set all of the fields. nulls are set by default. for (Schema.Field field : ((ResolvingDecoder) decoder).readFieldOrder()) { Object reusedValue = get(struct, field.pos());