Class RangePredicate
- java.lang.Object
-
- org.apache.pinot.common.request.context.predicate.BasePredicate
-
- org.apache.pinot.common.request.context.predicate.RangePredicate
-
- All Implemented Interfaces:
Predicate
public class RangePredicate extends BasePredicate
Predicate for RANGE.Pinot uses RANGE to represent '>', '>=', '<', '<=', BETWEEN so that intersection of multiple ranges can be merged.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.pinot.common.request.context.predicate.Predicate
Predicate.Type
-
-
Field Summary
Fields Modifier and Type Field Description static charDELIMITERstatic charLOWER_EXCLUSIVEstatic charLOWER_INCLUSIVEstatic StringUNBOUNDEDstatic charUPPER_EXCLUSIVEstatic charUPPER_INCLUSIVE-
Fields inherited from class org.apache.pinot.common.request.context.predicate.BasePredicate
_lhs
-
-
Constructor Summary
Constructors Constructor Description RangePredicate(ExpressionContext lhs, boolean lowerInclusive, String lowerBound, boolean upperInclusive, String upperBound)RangePredicate(ExpressionContext lhs, String range)The range is formatted as 5 parts: Lower inclusive '[' or exclusive '(' Lower bound ('*' for unbounded) Delimiter ('\0') Upper bound ('*' for unbounded) Upper inclusive ']' or exclusive ')'
-
Method Summary
Modifier and Type Method Description booleanequals(Object o)StringgetLowerBound()Predicate.TypegetType()Returns the type of the predicate.StringgetUpperBound()inthashCode()booleanisLowerInclusive()booleanisUpperInclusive()StringtoString()-
Methods inherited from class org.apache.pinot.common.request.context.predicate.BasePredicate
getLhs, setLhs
-
-
-
-
Field Detail
-
DELIMITER
public static final char DELIMITER
- See Also:
- Constant Field Values
-
LOWER_EXCLUSIVE
public static final char LOWER_EXCLUSIVE
- See Also:
- Constant Field Values
-
LOWER_INCLUSIVE
public static final char LOWER_INCLUSIVE
- See Also:
- Constant Field Values
-
UPPER_EXCLUSIVE
public static final char UPPER_EXCLUSIVE
- See Also:
- Constant Field Values
-
UPPER_INCLUSIVE
public static final char UPPER_INCLUSIVE
- See Also:
- Constant Field Values
-
UNBOUNDED
public static final String UNBOUNDED
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RangePredicate
public RangePredicate(ExpressionContext lhs, String range)
The range is formatted as 5 parts:- Lower inclusive '[' or exclusive '('
- Lower bound ('*' for unbounded)
- Delimiter ('\0')
- Upper bound ('*' for unbounded)
- Upper inclusive ']' or exclusive ')'
-
RangePredicate
public RangePredicate(ExpressionContext lhs, boolean lowerInclusive, String lowerBound, boolean upperInclusive, String upperBound)
-
-
Method Detail
-
getType
public Predicate.Type getType()
Description copied from interface:PredicateReturns the type of the predicate.
-
isLowerInclusive
public boolean isLowerInclusive()
-
getLowerBound
public String getLowerBound()
-
isUpperInclusive
public boolean isUpperInclusive()
-
getUpperBound
public String getUpperBound()
-
-