xiangfu0 commented on code in PR #20203:
URL: https://github.com/apache/pinot/pull/20203#discussion_r4520701489
##########
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:
MINOR (optional): Consider also deserializing a copy padded the old way,
e.g. `Arrays.copyOf(bytes, (Integer.BYTES + size) << 2)`, and checking it with
`verify`. That would make sure future versions can still read payloads from
servers running older releases. I checked this manually for all three set types
and it works today.
---
AI-generated review via IntentLab ยท Model: Claude Opus 5.5 (claude-opus-5-5).
--
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]