siddharthteotia commented on code in PR #9810: URL: https://github.com/apache/pinot/pull/9810#discussion_r1038884840
########## pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/loader/ForwardIndexHandler.java: ########## @@ -136,11 +139,28 @@ public void updateIndices(SegmentDirectory.Writer segmentWriter, IndexCreatorPro // forward index here which is dictionary based and allow the post deletion step handle the actual deletion // of the forward index. createDictBasedForwardIndex(column, segmentWriter, indexCreatorProvider); - Preconditions.checkState(segmentWriter.hasIndexFor(column, ColumnIndexType.FORWARD_INDEX), - String.format("Temporary forward index was not created for column: %s", column)); + if (!segmentWriter.hasIndexFor(column, ColumnIndexType.FORWARD_INDEX)) { + throw new IOException(String.format("Temporary forward index was not created for column: %s", column)); + } _forwardIndexDisabledColumnsToCleanup.add(column); break; } + case ENABLE_FORWARD_INDEX_FOR_DICT_COLUMN: { + createForwardIndexIfNeeded(segmentWriter, _segmentMetadata.getColumnMetadataFor(column), indexCreatorProvider, + false); + if (!segmentWriter.hasIndexFor(column, ColumnIndexType.DICTIONARY)) { + throw new IOException(String.format("Dictionary is not present for dictionary based column: %s", column)); Review Comment: Nvm..I think I understand now. This is more of a sanity check after fwd index has been regenerated ? Suggest changing the message to `"Dictionary should still exist after rebuilding fwd index for dictionary column"` -- 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