Abhishek Chennaka has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/23481 )

Change subject: KUDU-1261 [Java] Implement serdes of Array Type column
......................................................................


Patch Set 12:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/23481/12/java/kudu-client/src/test/java/org/apache/kudu/client/TestArraySerdes.java
File java/kudu-client/src/test/java/org/apache/kudu/client/TestArraySerdes.java:

http://gerrit.cloudera.org:8080/#/c/23481/12/java/kudu-client/src/test/java/org/apache/kudu/client/TestArraySerdes.java@308
PS12, Line 308: empty
> nit: this is null, not empty array, isn't it?  Or maybe you meant something
The value returned here is empty array -> int[0] and not NULL.
By design:
Null array in Java (null input) ? serialized with no vector ? deserialized as 
int[0].
Empty array in Java (new int[0]) ? serialized with empty vector ? deserialized 
as int[0].

Reason being:
FlatBuffers doesn’t differentiate “vector absent” from “empty vector” in a way 
we are checking here. If we don’t write the vector, on read we just get 
length() == 0. That leads directly to new int[0].

>From end user perspective, we set the nonNullBitmaps for every cell which 
>returns null before we hit deserialize().



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie1ad9f65fe94c8662ed0e0834ce849e078fc72d2
Gerrit-Change-Number: 23481
Gerrit-PatchSet: 12
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: Fri, 03 Oct 2025 21:09:56 +0000
Gerrit-HasComments: Yes

Reply via email to