cleanup predicate enum
@@ -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;
}
}
