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


##########
pinot-common/src/main/java/org/apache/pinot/common/utils/config/QueryOptionsUtils.java:
##########
@@ -145,6 +149,34 @@ public static boolean isSkipScanFilterReorder(Map<String, 
String> queryOptions)
     return 
"false".equalsIgnoreCase(queryOptions.get(QueryOptionKey.USE_SCAN_REORDER_OPTIMIZATION));
   }
 
+  @Nullable
+  public static Map<String, Set<FieldConfig.IndexType>> 
getIndexSkipConfig(Map<String, String> queryOptions) {
+    // Example config:  indexSkipConfig='col1=inverted,range&col2=inverted'
+    String indexSkipConfigStr = 
queryOptions.get(QueryOptionKey.INDEX_SKIP_CONFIG);
+    if (indexSkipConfigStr == null) {
+      return null;
+    }
+
+    String[] perColumnIndexSkip = indexSkipConfigStr.split("&");

Review Comment:
   Suggest using `StringUtils.split(indexSkipConfigStr, '&')` which is more 
lightweight. The current API will try to do regex match. Same for other split 
calls



##########
pinot-spi/src/main/java/org/apache/pinot/spi/utils/CommonConstants.java:
##########
@@ -361,6 +361,7 @@ public static class QueryOptionKey {
         public static final String SERVER_RETURN_FINAL_RESULT = 
"serverReturnFinalResult";
         // Reorder scan based predicates based on cardinality and number of 
selected values
         public static final String AND_SCAN_REORDERING = "AndScanReordering";
+        public static final String INDEX_SKIP_CONFIG = "indexSkipConfig";

Review Comment:
   (personal preference) I feel `skipIndexes` is more consistent with other 
option keys



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