Class SuppressedAggregatorFactory.SuppressedAggregator
- java.lang.Object
-
- org.apache.druid.query.aggregation.SuppressedAggregatorFactory.SuppressedAggregator
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Aggregator
- Enclosing class:
- SuppressedAggregatorFactory
public static class SuppressedAggregatorFactory.SuppressedAggregator extends Object implements Aggregator
-
-
Constructor Summary
Constructors Constructor Description SuppressedAggregator(Aggregator delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
aggregate()
Performs aggregation.void
close()
boolean
equals(Object o)
Object
get()
Aggregator
getDelegate()
double
getDouble()
The default implementation castsAggregator.getFloat()
to double.float
getFloat()
long
getLong()
int
hashCode()
boolean
isNull()
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.String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.druid.query.aggregation.Aggregator
aggregateWithSize
-
-
-
-
Constructor Detail
-
SuppressedAggregator
public SuppressedAggregator(Aggregator delegate)
-
-
Method Detail
-
aggregate
public void aggregate()
Description copied from interface:Aggregator
Performs aggregation.- Specified by:
aggregate
in interfaceAggregator
-
get
@Nullable public Object get()
- Specified by:
get
in interfaceAggregator
-
getFloat
public float getFloat()
- Specified by:
getFloat
in interfaceAggregator
-
getLong
public long getLong()
- Specified by:
getLong
in interfaceAggregator
-
getDouble
public double getDouble()
Description copied from interface:Aggregator
The 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:
getDouble
in interfaceAggregator
-
isNull
public boolean isNull()
Description copied from interface:Aggregator
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. The default implementation always return false to enable smooth backward compatibility, re-implement if your aggregator is nullable.- Specified by:
isNull
in interfaceAggregator
-
close
public void close()
- Specified by:
close
in interfaceAggregator
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
getDelegate
public Aggregator getDelegate()
-
-