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


##########
pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/creator/SegmentGeneratorConfig.java:
##########
@@ -250,6 +208,47 @@ public SegmentGeneratorConfig(TableConfig tableConfig, 
Schema schema) {
       _rowTimeValueCheck = ingestionConfig.isRowTimeValueCheck();
       _segmentTimeValueCheck = ingestionConfig.isSegmentTimeValueCheck();
     }
+
+    _indexConfigsByColName = 
FieldIndexConfigsUtil.createIndexConfigsByColName(tableConfig, schema);
+
+    if (indexingConfig != null) {
+      // NOTE: 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.inverted.index.before.push")))

Review Comment:
   OK! but this code has been copied from 
https://github.com/apache/pinot/blob/f8d432013bc5672fd04088106bf2efd69a0d48a9/pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/creator/SegmentGeneratorConfig.java#L192



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to