anoopj commented on code in PR #16092:
URL: https://github.com/apache/iceberg/pull/16092#discussion_r3268076245
##########
core/src/main/java/org/apache/iceberg/ManifestInfoStruct.java:
##########
@@ -224,4 +255,130 @@ public String toString() {
.add("dv_cardinality", dvCardinality == null ? "null" : dvCardinality)
.toString();
}
+
+ static class Builder {
+ private int addedFilesCount = -1;
+ private int existingFilesCount = -1;
+ private int deletedFilesCount = -1;
+ private int replacedFilesCount = -1;
+ private long addedRowsCount = -1L;
+ private long existingRowsCount = -1L;
+ private long deletedRowsCount = -1L;
+ private long replacedRowsCount = -1L;
+ private long minSequenceNumber = -1L;
+ private byte[] dv = null;
+ private Long dvCardinality = null;
+
+ Builder addedFilesCount(int count) {
+ this.addedFilesCount = count;
+ return this;
+ }
+
+ Builder existingFilesCount(int count) {
+ this.existingFilesCount = count;
+ return this;
+ }
+
+ Builder deletedFilesCount(int count) {
+ this.deletedFilesCount = count;
+ return this;
+ }
+
+ Builder replacedFilesCount(int count) {
+ this.replacedFilesCount = count;
+ return this;
+ }
+
+ Builder addedRowsCount(long count) {
+ this.addedRowsCount = count;
+ return this;
+ }
+
+ Builder existingRowsCount(long count) {
+ this.existingRowsCount = count;
+ return this;
+ }
+
+ Builder deletedRowsCount(long count) {
+ this.deletedRowsCount = count;
+ return this;
+ }
+
+ Builder replacedRowsCount(long count) {
+ this.replacedRowsCount = count;
+ return this;
+ }
+
+ Builder minSequenceNumber(long sequenceNumber) {
+ this.minSequenceNumber = sequenceNumber;
+ return this;
+ }
+
+ Builder dv(ByteBuffer buffer) {
+ this.dv = buffer != null ? ByteBuffers.toByteArray(buffer) : null;
+ return this;
+ }
+
+ Builder dv(byte[] buffer) {
+ this.dv = buffer;
+ return this;
+ }
+
+ Builder dvCardinality(Long cardinality) {
+ this.dvCardinality = cardinality;
+ return this;
+ }
+
+ ManifestInfoStruct build() {
+ Preconditions.checkArgument(
Review Comment:
That makes sense. Fixing it in https://github.com/apache/iceberg/pull/16408
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]