Class FilteredAggregator
java.lang.Object
org.apache.druid.query.aggregation.FilteredAggregator
- All Implemented Interfaces:
Closeable,AutoCloseable,Aggregator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidPerforms aggregation.voidclose()get()doubleThe default implementation castsAggregator.getFloat()to double.floatgetFloat()longgetLong()booleanisNull()returns true if aggregator's output type is primitive long/double/float and aggregated value is null, but when aggregated output type is Object, this method always returns false, and users are advised to check nullability for the object returned byAggregator.get()method.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.druid.query.aggregation.Aggregator
aggregateWithSize
-
Constructor Details
-
FilteredAggregator
-
-
Method Details
-
aggregate
public void aggregate()Description copied from interface:AggregatorPerforms aggregation.- Specified by:
aggregatein interfaceAggregator
-
isNull
public boolean isNull()Description copied from interface:Aggregatorreturns true if aggregator's output type is primitive long/double/float and aggregated value is null, but when aggregated output type is Object, this method always returns false, and users are advised to check nullability for the object returned byAggregator.get()method. The default implementation always return false to enable smooth backward compatibility, re-implement if your aggregator is nullable.- Specified by:
isNullin interfaceAggregator
-
get
- Specified by:
getin interfaceAggregator
-
getFloat
public float getFloat()- Specified by:
getFloatin interfaceAggregator
-
getLong
public long getLong()- Specified by:
getLongin interfaceAggregator
-
getDouble
public double getDouble()Description copied from interface:AggregatorThe default implementation castsAggregator.getFloat()to double. This default method is added to enable smooth backward compatibility, please re-implement it if your aggregators work with numeric double columns.- Specified by:
getDoublein interfaceAggregator
-
close
public void close()- Specified by:
closein interfaceAggregator- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-