Zoltan Chovan has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/23419 )

Change subject: KUDU-1261 [Java] Array Datatype client support
......................................................................


Patch Set 7:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/23419/7/java/kudu-client/src/main/java/org/apache/kudu/ColumnSchema.java
File java/kudu-client/src/main/java/org/apache/kudu/ColumnSchema.java:

http://gerrit.cloudera.org:8080/#/c/23419/7/java/kudu-client/src/main/java/org/apache/kudu/ColumnSchema.java@291
PS7, Line 291: this.array = array;
             :         // validate invariant: exactly one non-null
             :         int nonNull = 0;
             :         if (array != null) {
             :           nonNull++;
             :         }
             :         if (nonNull != 1) {
             :           throw new IllegalArgumentException("Descriptor must 
contain exactly one non-null field");
             :         }
why is this logic necessary? wouldn't a simple this.array = 
Objects.requireNonNull(array, "array descriptor cannot be null"); suffice? I 
don't really understand from the comments what "fields" are checked here. Maybe 
this is going to be extended in some way in the future/upcoming changes?



--
To view, visit http://gerrit.cloudera.org:8080/23419
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I02b5fc52d984d424b7be53e3cc4e3236a8d33aa9
Gerrit-Change-Number: 23419
Gerrit-PatchSet: 7
Gerrit-Owner: Abhishek Chennaka <[email protected]>
Gerrit-Reviewer: Abhishek Chennaka <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Xuebin Su <[email protected]>
Gerrit-Reviewer: Zoltan Chovan <[email protected]>
Gerrit-Comment-Date: Wed, 24 Sep 2025 08:29:01 +0000
Gerrit-HasComments: Yes

Reply via email to