You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/11/30 03:36:24 UTC

[GitHub] [pinot] siddharthteotia commented on a change in pull request #7840: Add getPredicate() to PredicateEvaluator

siddharthteotia commented on a change in pull request #7840:
URL: https://github.com/apache/pinot/pull/7840#discussion_r758906121



##########
File path: pinot-core/src/main/java/org/apache/pinot/core/operator/filter/predicate/BasePredicateEvaluator.java
##########
@@ -18,7 +18,25 @@
  */
 package org.apache.pinot.core.operator.filter.predicate;
 
+import org.apache.pinot.common.request.context.predicate.Predicate;
+
+
 public abstract class BasePredicateEvaluator implements PredicateEvaluator {
+  protected final Predicate _predicate;
+
+  protected BasePredicateEvaluator(Predicate predicate) {
+    _predicate = predicate;
+  }
+
+  @Override
+  public Predicate getPredicate() {
+    return _predicate;
+  }
+
+  @Override
+  public Predicate.Type getPredicateType() {
+    return getPredicate().getType();

Review comment:
       Do `_predicate.getType()` instead of function call (which although may not happen at runtime if JVM inlines) ?




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