pradeepgv42 commented on a change in pull request #6120: URL: https://github.com/apache/incubator-pinot/pull/6120#discussion_r524477668
########## File path: pinot-core/src/test/java/org/apache/pinot/core/segment/index/loader/SegmentPreProcessorTest.java ########## @@ -198,6 +207,51 @@ public void testEnableTextIndexOnNewColumnRaw() checkTextIndexCreation(NEWLY_ADDED_STRING_COL_RAW, 1, 1, _newColumnsSchemaWithText, true, true, true, 4); } + @Test + public void testEnableFSTIndexOnNewColumnDictEncoded() throws Exception { + Set<String> fstColumns = new HashSet<>(); + fstColumns.add(NEWLY_ADDED_FST_COL_DICT); + _indexLoadingConfig.setFSTIndexColumns(fstColumns); + + // Create a segment in V3, add a new dict encoded column with text index enabled + constructV3Segment(); + checkFSTIndexCreation( + NEWLY_ADDED_FST_COL_DICT, 1, 1, _newColumnsSchema4, + true, true, 4); + + constructV1Segment(); + checkFSTIndexCreation( + NEWLY_ADDED_FST_COL_DICT, 1, 1, _newColumnsSchema4, + true, true,4); + } + + + @Test + public void testEnableFSTIndexOnExistingColumnDictEncoded() throws Exception { + Set<String> fstColumns = new HashSet<>(); + fstColumns.add(EXISTING_STRING_COL_DICT); + _indexLoadingConfig.setFSTIndexColumns(fstColumns); + + // Create a segment in V3, add a new dict encoded column with text index enabled + constructV3Segment(); + SegmentMetadataImpl segmentMetadata = new SegmentMetadataImpl(_indexDir); + ColumnMetadata columnMetadata = segmentMetadata.getColumnMetadataFor( + EXISTING_STRING_COL_DICT); + // column exists and does not have text index enabled Review comment: done ---------------------------------------------------------------- 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. 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