Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/23483 )
Change subject: KUDU-1261 [Java] Add read support for Array Type ...................................................................... Patch Set 6: (2 comments) http://gerrit.cloudera.org:8080/#/c/23483/6/java/kudu-client/src/main/java/org/apache/kudu/util/ArrayCellViewUtil.java File java/kudu-client/src/main/java/org/apache/kudu/util/ArrayCellViewUtil.java: http://gerrit.cloudera.org:8080/#/c/23483/6/java/kudu-client/src/main/java/org/apache/kudu/util/ArrayCellViewUtil.java@43 PS6, Line 43: if (!view.isValid(i)) { : throw new IllegalStateException("Null element at " + i); : } > In this, yes the reason being avoid silently losing null information. I'm not sure it makes sense to have such behavior on null elements there and introduce toNullableXxxArray in addition to what's there already. How do you choose which one to use to fetch the data as an array? In other words, with current toXxxArray() interface, where to get information on validity of elements, at least to know that some of them are null, so it would be possible to decide whether to call toXxxArray() or toNullableXxxArray()? I guess this means all those getters are supposed to work as toNullableXxxArray(), because using toXxxArray() doesn't make much sense unless writing some ugly code with try-catch-rinse-repeat. What do you think? http://gerrit.cloudera.org:8080/#/c/23483/6/java/kudu-client/src/main/java/org/apache/kudu/util/ArrayCellViewUtil.java@206 PS6, Line 206: if (!view.isValid(i)) { : out[i] = null; That's interesting -- here there isn't an exception, contrary to the behavior of toDoubleArray and alike. -- To view, visit http://gerrit.cloudera.org:8080/23483 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie26750cf540b0097c77e5454c1c1d20b3a194c52 Gerrit-Change-Number: 23483 Gerrit-PatchSet: 6 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: Zoltan Chovan <[email protected]> Gerrit-Comment-Date: Sat, 04 Oct 2025 00:26:03 +0000 Gerrit-HasComments: Yes
