richardstartin commented on code in PR #8518:
URL: https://github.com/apache/pinot/pull/8518#discussion_r848924792
##########
pinot-common/src/main/java/org/apache/pinot/pql/parsers/pql2/ast/FilterKind.java:
##########
@@ -48,4 +48,13 @@ public boolean isRange() {
return this == GREATER_THAN || this == GREATER_THAN_OR_EQUAL || this ==
LESS_THAN || this == LESS_THAN_OR_EQUAL
|| this == BETWEEN || this == RANGE;
}
+
+ /**
+ * Returns true if the filter is a predicate. Returns false otherwise. This
logic should mimic FilterContext.Type.
+ *
+ * @return where the filter is a predicate.
+ */
+ public boolean isPredicate() {
+ return this != AND && this != OR && this != NOT;
+ }
Review Comment:
This, along with the method `isRange` above it, is a little messy - it would
be better to add fields to the enum `_isRange` and `_isPredicate` and set them
in the enum initialiser.
--
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]