Abhishek Chennaka has posted comments on this change. ( http://gerrit.cloudera.org:8080/23419 )
Change subject: KUDU-1261 [Java] Array Datatype client support ...................................................................... Patch Set 7: (2 comments) http://gerrit.cloudera.org:8080/#/c/23419/4/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/4/java/kudu-client/src/main/java/org/apache/kudu/ColumnSchema.java@279 PS4, Line 279: > > But updated it with the given suggestions. Let me know what you think. Okay, we can update this code when we add more complex types in future. 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.require This is a part of future proofing, probably can be avoided currently. -- 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 19:14:47 +0000 Gerrit-HasComments: Yes
