snleee commented on code in PR #12361:
URL: https://github.com/apache/pinot/pull/12361#discussion_r1479216829


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/startree/StarTreeBuilderUtils.java:
##########
@@ -83,6 +85,27 @@ public static List<StarTreeV2BuilderConfig> 
generateBuilderConfigs(@Nullable Lis
     return builderConfigs;
   }
 
+  public static List<StarTreeV2BuilderConfig> generateBuilderConfigs(@Nullable 
List<StarTreeIndexConfig> indexConfigs,
+      boolean enableDefaultStarTree, Schema schema, JsonNode segmentMetadata) {
+    List<StarTreeV2BuilderConfig> builderConfigs = new ArrayList<>();
+    if (indexConfigs != null) {
+      for (StarTreeIndexConfig indexConfig : indexConfigs) {
+        StarTreeV2BuilderConfig builderConfig = 
StarTreeV2BuilderConfig.fromIndexConfig(indexConfig);
+        if (!builderConfigs.contains(builderConfig)) {

Review Comment:
   `StarTreeV2BuilderConfig` <- can we double check the `equals()` function for 
this class?



##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/startree/StarTreeBuilderUtils.java:
##########
@@ -83,6 +85,27 @@ public static List<StarTreeV2BuilderConfig> 
generateBuilderConfigs(@Nullable Lis
     return builderConfigs;
   }
 
+  public static List<StarTreeV2BuilderConfig> generateBuilderConfigs(@Nullable 
List<StarTreeIndexConfig> indexConfigs,
+      boolean enableDefaultStarTree, Schema schema, JsonNode segmentMetadata) {
+    List<StarTreeV2BuilderConfig> builderConfigs = new ArrayList<>();
+    if (indexConfigs != null) {
+      for (StarTreeIndexConfig indexConfig : indexConfigs) {
+        StarTreeV2BuilderConfig builderConfig = 
StarTreeV2BuilderConfig.fromIndexConfig(indexConfig);
+        if (!builderConfigs.contains(builderConfig)) {
+          builderConfigs.add(builderConfig);
+        }
+      }
+    }
+    if (enableDefaultStarTree) {

Review Comment:
   What's the current behavior if
   
   1. custom startree config is added
   2. enableDefaultStarTree is set to true
   
   Are we adding default startree or default startree + custom startreee?



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