gortiz commented on code in PR #10757: URL: https://github.com/apache/pinot/pull/10757#discussion_r1191030397
########## 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() + .treeToValue(fieldConfig.getIndexes().get(getPrettyName()), DictionaryIndexConfig.class); + // ensure encodingType is RAW where dictionary index config has disabled = true + if (indexConfig.isDisabled()) { + configsToUpdate.add(fieldConfig); + } + } catch (JsonProcessingException | NullPointerException ignore) { Review Comment: Why do we ignore the exception here? I would say that we need to throw it. Is there something I'm missing? -- 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