Jackie-Jiang commented on code in PR #10089:
URL: https://github.com/apache/pinot/pull/10089#discussion_r1087266825


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/loader/SegmentPreProcessor.java:
##########
@@ -211,7 +211,9 @@ private boolean needProcessStarTrees() {
         .shouldRemoveExistingStarTrees(starTreeBuilderConfigs, 
starTreeMetadataList)) {
       return false;
     }
-    return !starTreeBuilderConfigs.isEmpty();
+
+    // We need reprocessing if either new configs were added or existing 
configs are to be removed
+    return !starTreeBuilderConfigs.isEmpty() || starTreeMetadataList != null;

Review Comment:
   (minor) Good catch! Suggest changing it a little bit for readability:
   ```
       if (starTreeMetadataList != null) {
         return 
StarTreeBuilderUtils.shouldRemoveExistingStarTrees(starTreeBuilderConfigs, 
starTreeMetadataList);
       }
       return !starTreeBuilderConfigs.isEmpty();



##########
pinot-integration-test-base/src/test/java/org/apache/pinot/integration/tests/ClusterIntegrationTestUtils.java:
##########
@@ -286,7 +286,7 @@ public static void buildSegmentFromAvro(File avroFile, 
TableConfig tableConfig,
       org.apache.pinot.spi.data.Schema schema, int segmentIndex, File 
segmentDir, File tarDir)
       throws Exception {
     // Test segment with space and special character in the file name
-    buildSegmentFromAvro(avroFile, tableConfig, schema, segmentIndex + " %", 
segmentDir, tarDir);
+    buildSegmentFromAvro(avroFile, tableConfig, schema, segmentIndex + "_", 
segmentDir, tarDir);

Review Comment:
   Why do we need to change this? Is anything break because of this? We do want 
to test the case where segment name contains space and special character



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