gortiz commented on code in PR #10757:
URL: https://github.com/apache/pinot/pull/10757#discussion_r1191028548


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/dictionary/DictionaryIndexType.java:
##########
@@ -348,6 +353,50 @@ protected Dictionary createIndexReader(PinotDataBuffer 
dataBuffer, ColumnMetadat
   @Override
   protected void handleIndexSpecificCleanup(TableConfig tableConfig) {
     IndexingConfig indexingConfig = tableConfig.getIndexingConfig();
+    List<String> noDictionaryColumns = indexingConfig.getNoDictionaryColumns() 
== null
+        ? Lists.newArrayList()
+        : indexingConfig.getNoDictionaryColumns();
+    List<FieldConfig> fieldConfigList = tableConfig.getFieldConfigList() == 
null
+        ? Lists.newArrayList()
+        : tableConfig.getFieldConfigList();
+
+    List<FieldConfig> configsToUpdate = new ArrayList<>();
+    for (FieldConfig fieldConfig : fieldConfigList) {
+      // skip further computation of field configs which already has RAW 
encodingType
+      if (fieldConfig.getEncodingType() == FieldConfig.EncodingType.RAW) {
+        continue;
+      }
+      // ensure encodingType is RAW on noDictionaryColumns
+      if (noDictionaryColumns.remove(fieldConfig.getName())) {
+        configsToUpdate.add(fieldConfig);
+      }
+      try {
+        DictionaryIndexConfig indexConfig = new ObjectMapper()

Review Comment:
   Do not instantiate ObjectMapper here, use the JsonUtils we already have. We 
do that in order to use the same Jackson config on all the code.



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