xiangfu0 commented on code in PR #19795:
URL: https://github.com/apache/pinot/pull/19795#discussion_r4218025335


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/customobject/PercentileTDigestAccumulator.java:
##########
@@ -640,8 +632,13 @@ public int byteSize() {
 
   @Override
   public int smallByteSize() {
+    if (_legacyDegraded) {

Review Comment:
   [code-review] (contract nit) In legacy-degraded mode 
`smallByteSize()`/`asSmallBytes()` return/write the VERBOSE `serialize()` bytes 
(encoding 1, 32-byte header) rather than the small encoding the method names 
promise. Pinot-internal readers switch on the leading encoding int so they 
survive, but any caller following the tdunning contract (parsing `asSmallBytes` 
output as encoding 2 / 30-byte header, or choosing the small form for its size) 
mis-parses or gains nothing. Self-consistent within the class, so 
contract-level only — worth a doc note on both methods.



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