Class GreaterThanHavingSpec
- java.lang.Object
-
- org.apache.druid.query.groupby.having.GreaterThanHavingSpec
-
- All Implemented Interfaces:
Cacheable,HavingSpec
public class GreaterThanHavingSpec extends Object implements HavingSpec
The ">" operator in a "having" clause. This is similar to SQL's "having aggregation > value", except that an aggregation in SQL is an expression instead of an aggregation name as in Druid.
-
-
Constructor Summary
Constructors Constructor Description GreaterThanHavingSpec(String aggName, Number value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)This method treats internal value as double mainly for ease of test.booleaneval(ResultRow row)Evaluates if a given row satisfies the having spec.StringgetAggregationName()byte[]getCacheKey()Get a byte array used as a cache key.NumbergetValue()inthashCode()voidsetQuery(GroupByQuery query)Informs this HavingSpec that rows passed to "eval" will originate from a particular groupBy query.StringtoString()
-
-
-
Method Detail
-
getAggregationName
public String getAggregationName()
-
getValue
public Number getValue()
-
setQuery
public void setQuery(GroupByQuery query)
Description copied from interface:HavingSpecInforms this HavingSpec that rows passed to "eval" will originate from a particular groupBy query.- Specified by:
setQueryin interfaceHavingSpec
-
eval
public boolean eval(ResultRow row)
Description copied from interface:HavingSpecEvaluates if a given row satisfies the having spec.- Specified by:
evalin interfaceHavingSpec- Parameters:
row- A Row of data that may contain aggregated values- Returns:
- true if the given row satisfies the having spec. False otherwise.
-
equals
public boolean equals(Object o)
This method treats internal value as double mainly for ease of test.
-
getCacheKey
public byte[] getCacheKey()
Description copied from interface:CacheableGet a byte array used as a cache key.- Specified by:
getCacheKeyin interfaceCacheable- Returns:
- a cache key
-
-