siddharthteotia commented on code in PR #9810: URL: https://github.com/apache/pinot/pull/9810#discussion_r1041448767
########## pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/loader/defaultcolumn/V3DefaultColumnHandler.java: ########## @@ -62,16 +62,28 @@ protected boolean updateDefaultColumn(String column, DefaultColumnAction action) FieldSpec fieldSpec = _schema.getFieldSpecFor(column); Preconditions.checkNotNull(fieldSpec); boolean isSingleValue = fieldSpec.isSingleValueField(); - File forwardIndexFile; + boolean forwardIndexDisabled = !isSingleValue && isForwardIndexDisabled(column); + File forwardIndexFile = null; + File invertedIndexFile = null; if (isSingleValue) { forwardIndexFile = new File(_indexDir, column + V1Constants.Indexes.SORTED_SV_FORWARD_INDEX_FILE_EXTENSION); if (!forwardIndexFile.exists()) { forwardIndexFile = new File(_indexDir, column + V1Constants.Indexes.UNSORTED_SV_FORWARD_INDEX_FILE_EXTENSION); } } else { - forwardIndexFile = new File(_indexDir, column + V1Constants.Indexes.UNSORTED_MV_FORWARD_INDEX_FILE_EXTENSION); + if (forwardIndexDisabled) { + // An inverted index is created instead of forward index for multi-value columns with forward index disabled + invertedIndexFile = new File(_indexDir, column + V1Constants.Indexes.BITMAP_INVERTED_INDEX_FILE_EXTENSION); + } else { + forwardIndexFile = new File(_indexDir, column + V1Constants.Indexes.UNSORTED_MV_FORWARD_INDEX_FILE_EXTENSION); Review Comment: Related to the previous comment. Why is this behavior specialized to MV column ? > An inverted index is created instead of forward index for multi-value columns with forward index disabled Isn't this true for SV column as well or am I missing something ? -- 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