anoopj commented on code in PR #16092:
URL: https://github.com/apache/iceberg/pull/16092#discussion_r3155568925
##########
core/src/main/java/org/apache/iceberg/DeletionVectorStruct.java:
##########
@@ -124,4 +137,39 @@ public String toString() {
.add("cardinality", cardinality)
.toString();
}
+
+ static class Builder {
+ private String location = null;
+ private long offset = -1L;
+ private long sizeInBytes = -1L;
+ private long cardinality = -1L;
+
+ Builder location(String dvLocation) {
+ this.location = dvLocation;
+ return this;
+ }
+
+ Builder offset(long dvOffset) {
+ this.offset = dvOffset;
+ return this;
+ }
+
+ Builder sizeInBytes(long dvSizeInBytes) {
+ this.sizeInBytes = dvSizeInBytes;
+ return this;
+ }
+
+ Builder cardinality(long dvCardinality) {
+ this.cardinality = dvCardinality;
+ return this;
+ }
+
+ DeletionVectorStruct build() {
+ Preconditions.checkArgument(location != null, "Invalid location: null");
+ Preconditions.checkArgument(offset >= 0, "Invalid offset: %s", offset);
Review Comment:
Done.
--
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]