davecromberge commented on code in PR #14373:
URL: https://github.com/apache/pinot/pull/14373#discussion_r1869236699
##########
pinot-plugins/pinot-minion-tasks/pinot-minion-builtin-tasks/src/main/java/org/apache/pinot/plugin/minion/tasks/mergerollup/MergeRollupTaskUtils.java:
##########
@@ -45,12 +47,25 @@ private MergeRollupTaskUtils() {
*/
public static Map<String, Map<String, String>>
getLevelToConfigMap(Map<String, String> taskConfig) {
Map<String, Map<String, String>> levelToConfigMap = new TreeMap<>();
+
+ // Regex to match aggregation function parameter keys
+ Pattern pattern =
Pattern.compile("(\\w+)\\.aggregationFunctionParameters\\.(\\w+)\\.(\\w+)");
+
for (Map.Entry<String, String> entry : taskConfig.entrySet()) {
String key = entry.getKey();
for (String configKey : VALID_CONFIG_KEYS) {
if (key.endsWith(configKey)) {
String level = key.substring(0, key.length() - configKey.length() -
1);
levelToConfigMap.computeIfAbsent(level, k -> new
TreeMap<>()).put(configKey, entry.getValue());
+ } else {
+ Matcher matcher = pattern.matcher(key);
+ if (matcher.matches()) {
+ String level = matcher.group(1).trim(); // e.g., "1day" or "1hour"
+ String metric = matcher.group(2).trim(); // e.g., "metricColumnA"
or "metricColumnB"
+ String param = matcher.group(3).trim(); // e.g., "nominalEntries"
or "p"
+ String metricParam =
MergeTask.AGGREGATION_FUNCTION_PARAMETERS_PREFIX + metric + "." + param;
Review Comment:
Yes, I have taken this from the test suite:
```"daily.aggregationFunctionParameters.metricColumnA.nominalEntries":
"8092"```
In so doing, the user can control the resolution of sketches per time
granularity / metric column.
--
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]