t0mpere commented on code in PR #11744:
URL: https://github.com/apache/pinot/pull/11744#discussion_r1366876017


##########
pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/index/startree/StarTreeV2Metadata.java:
##########
@@ -44,8 +44,12 @@ public StarTreeV2Metadata(Configuration metadataProperties) {
     _functionColumnPairs = new HashSet<>();
     for (String functionColumnPair : 
metadataProperties.getStringArray(MetadataKey.FUNCTION_COLUMN_PAIRS)) {
       
_functionColumnPairs.add(AggregationFunctionColumnPair.fromColumnName(functionColumnPair));
-    }
-    _maxLeafRecords = metadataProperties.getInt(MetadataKey.MAX_LEAF_RECORDS);
+      Configuration functionColPairsConfig =
+          metadataProperties.subset(MetadataKey.AGGREGATION_CONFIG + "." + 
functionColumnPair);
+      if (!functionColPairsConfig.isEmpty()) {
+        
_functionColumnPairs.add(AggregationFunctionColumnPair.fromConfiguration(functionColPairsConfig));

Review Comment:
   I've changed the data structure to a treeMap with functionColumnPair as a 
string key to avoid duplicates.



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