Skip to content

Commit

Permalink
Fix revapi and style check
Browse files Browse the repository at this point in the history
  • Loading branch information
wmoustafa committed May 16, 2023
1 parent c9f9c27 commit 0629c8a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
11 changes: 4 additions & 7 deletions .palantir/revapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand All @@ -748,9 +748,6 @@ acceptedBreaks:
- code: "java.method.addedToInterface"
new: "method java.util.List<org.apache.iceberg.StatisticsFile> 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.DataFile> org.apache.iceberg.Snapshot::addedFiles()"
justification: "Deprecations for 1.0 release"
Expand Down
12 changes: 10 additions & 2 deletions core/src/main/java/org/apache/iceberg/avro/ValueReaders.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;

Expand Down Expand Up @@ -665,7 +673,7 @@ public S read(Decoder decoder, Object reuse) throws IOException {
S struct = reuseOrCreate(reuse);

if (decoder instanceof ResolvingDecoder) {
Set<Integer> existingFieldPositionsSet = new HashSet<>();
Set<Integer> 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());
Expand Down

0 comments on commit 0629c8a

Please sign in to comment.