siddharthteotia commented on code in PR #12223:
URL: https://github.com/apache/pinot/pull/12223#discussion_r1462869573


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/dictionary/DictionaryIndexType.java:
##########
@@ -308,7 +321,20 @@ public static Dictionary read(PinotDataBuffer dataBuffer, 
ColumnMetadata metadat
             : new BigDecimalDictionary(dataBuffer, length, numBytesPerValue);
       case STRING:
         numBytesPerValue = metadata.getColumnMaxLength();
-        return loadOnHeap ? new OnHeapStringDictionary(dataBuffer, length, 
numBytesPerValue)
+
+        // If interning is enabled, get the required interners.
+        FALFInterner<String> strInterner = null;
+        FALFInterner<byte[]> byteInterner = null;
+        Intern internConfig = indexConfig.getIntern();
+        if (internConfig != null && !internConfig.isDisabled()) {
+          Preconditions.checkState(loadOnHeap, "Interning is only supported 
for on-heap dictionaries.");

Review Comment:
   Do we explicitly ensure with a test that setting intern config for off-heap 
dictionary will throw error / unsupported ?



-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to