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


##########
pinot-common/src/main/java/org/apache/pinot/common/datatable/DataTableImplV4.java:
##########
@@ -417,8 +417,23 @@ protected String[] deserializeStringDictionary(ByteBuffer 
buffer)
       throws IOException {
     int dictionarySize = buffer.getInt();
     String[] stringDictionary = new String[dictionarySize];
+    byte[] valueBytes = null;
     for (int i = 0; i < dictionarySize; i++) {
-      stringDictionary[i] = DataTableUtils.decodeString(buffer);

Review Comment:
   Done — extracted `DataTableUtils.decodeStringArray(ByteBuffer)` (reuses one 
scratch byte array across entries) and switched both `DataTableImplV4` and 
`BaseDataBlock` dictionary deserialization to it. The unit test now targets the 
util directly (`DataTableUtilsDecodeStringArrayTest`).



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