Skip to content

Commit

Permalink
Fix checkstyle for main.
Browse files Browse the repository at this point in the history
  • Loading branch information
rdblue committed Dec 12, 2024
1 parent e962312 commit c220d50
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ private SerializationState(
this.fieldIdSize = VariantUtil.sizeOf(metadata.dictionarySize());
this.shreddedFields = shreddedFields;

int dataSize = 0;
int totalDataSize = 0;
// get the unshredded field names and values as byte buffers
ImmutableMap.Builder<String, ByteBuffer> unshreddedBuilder = ImmutableMap.builder();
if (unshredded != null) {
Expand All @@ -128,7 +128,7 @@ private SerializationState(
if (!replaced) {
ByteBuffer value = unshredded.sliceValue(field.second());
unshreddedBuilder.put(name, value);
dataSize += value.remaining();
totalDataSize += value.remaining();
}
}
}
Expand All @@ -140,12 +140,12 @@ private SerializationState(
this.isLarge = numElements > 0xFF;

for (VariantValue value : shreddedFields.values()) {
dataSize += value.sizeInBytes();
totalDataSize += value.sizeInBytes();
}

this.dataSize = dataSize;
this.dataSize = totalDataSize;
// offset size is the size needed to store the length of the data section
this.offsetSize = VariantUtil.sizeOf(dataSize);
this.offsetSize = VariantUtil.sizeOf(totalDataSize);
}

private int size() {
Expand Down
2 changes: 2 additions & 0 deletions core/src/main/java/org/apache/iceberg/variants/Variants.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
import org.apache.iceberg.util.DateTimeUtil;

public class Variants {
private Variants() {}

enum LogicalType {
NULL,
BOOLEAN,
Expand Down

0 comments on commit c220d50

Please sign in to comment.