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 18:46:35 UTC

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

Jackie-Jiang commented on a change in pull request #7840:
URL: https://github.com/apache/pinot/pull/7840#discussion_r759565703



##########
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:
       It should be inlined when there is no other override on `getPredicate()`. It is slightly safer this way in case some class overrides the `getPredicate()`




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