public final class NullableNumericAggregateCombiner<T> extends Object implements AggregateCombiner<T>
AggregateCombiner.
Used by AggregatorFactory.makeAggregateCombiner() to wrap non-null aware combiners. This
class is only used when SQL compatible null handling is enabled.EMPTY_ARRAY| Constructor and Description |
|---|
NullableNumericAggregateCombiner(AggregateCombiner<T> delegate) |
| Modifier and Type | Method and Description |
|---|---|
Class |
classOfObject() |
void |
fold(ColumnValueSelector selector)
Folds this AggregateCombiner's state value with the value of the given selector and saves it in this
AggregateCombiner's state, e.
|
double |
getDouble() |
float |
getFloat() |
long |
getLong() |
T |
getObject() |
boolean |
isNull()
Returns true if the primitive long, double, or float value returned by this selector should be treated as null.
|
void |
reset(ColumnValueSelector selector)
Resets this AggregateCombiner's state value to the value of the given selector, e.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinspectRuntimeShapepublic NullableNumericAggregateCombiner(AggregateCombiner<T> delegate)
public void reset(ColumnValueSelector selector)
AggregateCombinerObjectColumnSelector, the object returned from BaseObjectColumnValueSelector.getObject() must not be modified, and must not become a subject for
modification during subsequent AggregateCombiner.fold(org.apache.druid.segment.ColumnValueSelector) calls.reset in interface AggregateCombiner<T>public void fold(ColumnValueSelector selector)
AggregateCombineraggregatorFactory.combine(combiner.get*(), selector.get*()) call.
Unlike AggregatorFactory.combine(java.lang.Object, java.lang.Object), if the selector is an ObjectColumnSelector, the
object returned from BaseObjectColumnValueSelector.getObject() must not be modified, and must not
become a subject for modification during subsequent fold() calls.
Since the state of AggregateCombiner is undefined before AggregateCombiner.reset(org.apache.druid.segment.ColumnValueSelector) is ever called on it, the effects of
calling fold() are also undefined in this case.fold in interface AggregateCombiner<T>AggregatorFactory.combine(java.lang.Object, java.lang.Object)public float getFloat()
getFloat in interface BaseFloatColumnValueSelectorpublic double getDouble()
getDouble in interface BaseDoubleColumnValueSelectorpublic long getLong()
getLong in interface BaseLongColumnValueSelectorpublic boolean isNull()
BaseNullableColumnValueSelectorBaseLongColumnValueSelector.getLong(), BaseDoubleColumnValueSelector.getDouble()
and BaseFloatColumnValueSelector.getFloat() must check this method first, or else they may improperly
use placeholder values returned by the primitive get methods.
Users of BaseObjectColumnValueSelector.getObject() should not call this method. Instead, call "getObject"
and check if it is null.isNull in interface AggregateCombiner<T>isNull in interface BaseNullableColumnValueSelector@Nullable public T getObject()
getObject in interface BaseObjectColumnValueSelector<T>public Class classOfObject()
classOfObject in interface BaseObjectColumnValueSelector<T>Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.