krishan1390 commented on code in PR #16921:
URL: https://github.com/apache/pinot/pull/16921#discussion_r2389743908


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/loader/InvertedIndexAndDictionaryBasedForwardIndexCreator.java:
##########
@@ -280,11 +282,16 @@ private Map<String, String> 
createForwardIndexForSVColumn()
       writeToForwardIndex(dictionary, context);
 
       // Setup and return the metadata properties to update
-      Map<String, String> metadataProperties = new HashMap<>();
-      metadataProperties.put(getKeyFor(_columnName, HAS_DICTIONARY), 
String.valueOf(_dictionaryEnabled));
-      metadataProperties.put(getKeyFor(_columnName, DICTIONARY_ELEMENT_SIZE),
-          String.valueOf(_dictionaryEnabled ? 
_columnMetadata.getColumnMaxLength() : 0));
-      return metadataProperties;
+      if (_dictionaryEnabled) {
+        return Map.of();

Review Comment:
   why don't we need to set DICTIONARY_ELEMENT_SIZE here ? I guess 
HAS_DICTIONARY isn't set because its default value is true. 



##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/creator/impl/SegmentColumnarIndexCreator.java:
##########
@@ -661,7 +674,8 @@ public static void 
addColumnMetadataInfo(PropertiesConfiguration properties, Str
         String.valueOf(columnIndexCreationInfo.getTotalNumberOfEntries()));
     properties.setProperty(getKeyFor(column, IS_AUTO_GENERATED),
         String.valueOf(columnIndexCreationInfo.isAutoGenerated()));
-    if (dataType.equals(DataType.STRING) || dataType.equals(DataType.BYTES) || 
dataType.equals(DataType.JSON)) {
+    DataType storedType = dataType.getStoredType();
+    if (storedType == DataType.STRING || storedType == DataType.BYTES) {

Review Comment:
   was there any bug in the previous code of checking dataType directly ? and 
why are we removing json now ? 



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