richardstartin commented on code in PR #8759:
URL: https://github.com/apache/pinot/pull/8759#discussion_r880185385
##########
pinot-core/src/main/java/org/apache/pinot/core/operator/filter/predicate/PredicateEvaluator.java:
##########
@@ -72,6 +72,27 @@ public interface PredicateEvaluator {
*/
boolean applySV(int value);
+ /**
+ * Apply the predicate to a batch of single-value entries.
+ * Compact matching entries into the prefix of the arrays.
+ *
+ * @param limit How much of the input to consume.
+ * @param docIds The docIds associated with the values - may be modified by
invocation.
+ * @param values Batch of dictionary ids or raw values - may be modified by
invocation.
+ * @return the index of the first non-matching entry.
+ */
+ default int applySV(int limit, int[] docIds, int[] values) {
+ int matches = 0;
+ for (int i = 0; i < limit; i++) {
+ int value = values[i];
+ if (applySV(value)) {
+ docIds[matches] = docIds[i];
+ values[matches++] = value;
Review Comment:
Sure, I thought it could be useful in the future, e.g. to aggregate the
matching values
--
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]