mayankshriv commented on a change in pull request #4321: #4317 Feature/variable 
length bytes offline dictionary for indexing bytes and string dicts.
URL: https://github.com/apache/incubator-pinot/pull/4321#discussion_r295597752
 
 

 ##########
 File path: 
pinot-core/src/main/java/org/apache/pinot/core/segment/index/readers/ImmutableDictionaryReader.java
 ##########
 @@ -244,6 +252,6 @@ protected String getPaddedString(int dictId, byte[] 
buffer) {
   }
 
   protected byte[] getBuffer() {
-    return new byte[_numBytesPerValue];
+    return (_valueReader instanceof VarLengthBytesValueReaderWriter) ? null : 
new byte[_numBytesPerValue];
 
 Review comment:
   Instance of can be avoided by using ThreadLocal byte[] that is initialized 
to null in the constructor (already has the `if/else`)?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to