Jackie-Jiang commented on code in PR #20203:
URL: https://github.com/apache/pinot/pull/20203#discussion_r4532161539


##########
pinot-core/src/test/java/org/apache/pinot/core/query/aggregation/function/distinct/OffHeapSetTest.java:
##########
@@ -65,7 +65,9 @@ public void testOffHeap32BitSet() {
       }
       verify(offHeapSet, onHeapSet);
 
-      try (OffHeap32BitSet offHeapSet2 = 
OffHeap32BitSet.deserialize(ByteBuffer.wrap(offHeapSet.serialize()))) {
+      byte[] bytes = offHeapSet.serialize();
+      assertEquals(bytes.length, Integer.BYTES + offHeapSet.size() * 
Integer.BYTES);

Review Comment:
   Thanks for checking this. `deserialize` reads the size header and exactly 
`size` entries, so trailing bytes are ignored, as you verified. These 
intermediate results are never persisted, so padded payloads only exist while 
servers from older releases are still running during an upgrade. I'd rather not 
keep that transient shape in a permanent test.
   



-- 
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]

Reply via email to