You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by ri...@apache.org on 2022/03/01 19:11:31 UTC

[pinot] branch master updated: cleanup predicate enum (#8268)

This is an automated email from the ASF dual-hosted git repository.

richardstartin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new 2d65534  cleanup predicate enum (#8268)
2d65534 is described below

commit 2d65534de47e16cab78bb7d48ff7e960af2a00d5
Author: Richard Startin <ri...@startree.ai>
AuthorDate: Tue Mar 1 19:11:00 2022 +0000

    cleanup predicate enum (#8268)
---
 .../pinot/common/request/context/predicate/Predicate.java  | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/pinot-common/src/main/java/org/apache/pinot/common/request/context/predicate/Predicate.java b/pinot-common/src/main/java/org/apache/pinot/common/request/context/predicate/Predicate.java
index 0444975..b0d0b5c 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/request/context/predicate/Predicate.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/request/context/predicate/Predicate.java
@@ -28,10 +28,20 @@ import org.apache.pinot.common.request.context.ExpressionContext;
  */
 public interface Predicate {
   enum Type {
-    EQ, NOT_EQ, IN, NOT_IN, RANGE, REGEXP_LIKE, TEXT_MATCH, JSON_MATCH, IS_NULL, IS_NOT_NULL;
+    EQ, NOT_EQ(true), IN, NOT_IN(true), RANGE, REGEXP_LIKE, TEXT_MATCH, JSON_MATCH, IS_NULL, IS_NOT_NULL(true);
+
+    private final boolean _exclusive;
+
+    Type(boolean exclusive) {
+      _exclusive = exclusive;
+    }
+
+    Type() {
+      this(false);
+    }
 
     public boolean isExclusive() {
-      return this == NOT_EQ || this == NOT_IN || this == IS_NOT_NULL;
+      return _exclusive;
     }
   }
 

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org