public final class NullableAggregateCombiner<T> extends Object implements AggregateCombiner<T>
BaseNullableColumnValueSelector.isNull()
on the selector as only non-null values will be passed to the delegate combiner.
This class is only used when SQL compatible null handling is enabled.EMPTY_ARRAY| Constructor and Description |
|---|
NullableAggregateCombiner(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 selected primitive value is null for
BaseFloatColumnValueSelector,
BaseLongColumnValueSelector and BaseDoubleColumnValueSelector otherwise false. |
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 NullableAggregateCombiner(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()
BaseNullableColumnValueSelectorBaseFloatColumnValueSelector,
BaseLongColumnValueSelector and BaseDoubleColumnValueSelector otherwise false.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–2019 The Apache Software Foundation. All rights reserved.