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


##########
pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/creator/SegmentGeneratorConfig.java:
##########
@@ -215,16 +215,18 @@ public SegmentGeneratorConfig(TableConfig tableConfig, 
Schema schema) {
     _indexConfigsByColName = 
FieldIndexConfigsUtil.createIndexConfigsByColName(tableConfig, schema);
 
     if (indexingConfig != null) {
-      // NOTE: There are 2 ways to configure creating inverted index during 
segment generation:
+      // NOTE: By default inverted indexes are not created during segment 
creation
+      // There are 2 ways to configure creating inverted index during segment 
generation:
       //       - Set 'generate.inverted.index.before.push' to 'true' in custom 
config (deprecated)
       //       - Enable 'createInvertedIndexDuringSegmentGeneration' in 
indexing config
       // TODO: Clean up the table configs with the deprecated settings, and 
always use the one in the indexing config
       // TODO 2: Decide what to do with this. Index-spi is based on the idea 
that TableConfig is the source of truth
       if (indexingConfig.getInvertedIndexColumns() != null) {
         Map<String, String> customConfigs = 
tableConfig.getCustomConfig().getCustomConfigs();
-        if ((customConfigs != null && 
Boolean.parseBoolean(customConfigs.get(GENERATE_INV_BEFORE_PUSH_DEPREC_PROP)))
-            || indexingConfig.isCreateInvertedIndexDuringSegmentGeneration()) {
-          setIndexOn(StandardIndexes.inverted(), IndexConfig.ENABLED, 
indexingConfig.getInvertedIndexColumns());
+        boolean shouldSkipInvertedIndex = 
!indexingConfig.isCreateInvertedIndexDuringSegmentGeneration()
+            && (customConfigs == null || 
Boolean.parseBoolean(customConfigs.get(GENERATE_INV_BEFORE_PUSH_DEPREC_PROP)));

Review Comment:
   I've changed it. I think it is easier to read now



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