You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "gortiz (via GitHub)" <gi...@apache.org> on 2023/02/21 12:04:09 UTC

[GitHub] [pinot] gortiz commented on a diff in pull request #10270: Adding partition pruner in QueryContext

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


##########
pinot-common/src/main/java/org/apache/pinot/common/utils/config/QueryOptionsUtils.java:
##########
@@ -190,4 +191,25 @@ public static Integer getGroupTrimThreshold(Map<String, String> queryOptions) {
     String groupByTrimThreshold = queryOptions.get(QueryOptionKey.GROUP_TRIM_THRESHOLD);
     return groupByTrimThreshold != null ? Integer.parseInt(groupByTrimThreshold) : null;
   }
+
+  // Sample input: k1:1/k1:2/k1:3/k2:4/k2:5/k2:6
+  // Sample output: {k1=[1, 2, 3], k2=[4, 5, 6]}
+  public static Map<String, Set<Integer>> getColumnPartitionMap(Map<String, String> queryOptions) {

Review Comment:
   Couldn't we use other standard format (like json) here? Or json without quotes or something like that. Adding more formats makes it complex for the writer and introduce new bugs. For example, this method does not allow to use `:` or `/` in the values.
   
   By using json without quotes we can implement the method with jackson (changing the config as explained [here](https://stackoverflow.com/questions/28788331/creating-json-without-quotes)) and the input would be something like:
   
   ```js
   {k1: [1, 2, 3], k2: [4,5,6]}
   ```



-- 
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-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org