a34729t commented on code in PR #19280:
URL: https://github.com/apache/pinot/pull/19280#discussion_r3806369826


##########
pinot-spi/src/main/java/org/apache/pinot/spi/utils/CommonConstants.java:
##########
@@ -862,6 +860,10 @@ public static class QueryOptionKey {
 
         public static final String IN_PREDICATE_PRE_SORTED = 
"inPredicatePreSorted";
         public static final String IN_PREDICATE_LOOKUP_ALGORITHM = 
"inPredicateLookupAlgorithm";
+        /// When true, the column-value and bloom-filter segment pruners 
always attempt to prune segments for
+        /// IN predicates, regardless of the number of values in the IN clause 
(i.e. the server-configured
+        /// `inpredicate.threshold` is ignored for this query). Defaults to 
false.
+        public static final String FORCE_IN_PREDICATE_PRUNING = 
"forceInPredicatePruning";

Review Comment:
   Done



##########
pinot-core/src/main/java/org/apache/pinot/core/query/pruner/ValueBasedSegmentPruner.java:
##########
@@ -57,28 +58,28 @@ public boolean isApplicableTo(QueryContext query) {
     if (query.getFilter() == null) {
       return false;
     }
-    return isApplicableToFilter(query.getFilter());
+    return isApplicableToFilter(query.getFilter(), 
isInPredicatePruningForced(query));
   }
 
   /// 1. NOT is not applicable for segment pruning;
   /// 2. For OR, if one of the child filter is not applicable for pruning, the 
parent filter is not applicable;
   /// 3. For AND, if one of the child filter is applicable for pruning, the 
parent filter is applicable, but it
   ///    doesn't mean this child filter can prune the segment.
   /// 4. The specific pruners decide their own applicable predicate types.
-  private boolean isApplicableToFilter(FilterContext filter) {
+  private boolean isApplicableToFilter(FilterContext filter, boolean 
forceInPredicatePruning) {

Review Comment:
   Done



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

Reply via email to