Class DoubleFirstLastVectorAggregator
java.lang.Object
org.apache.druid.query.aggregation.firstlast.FirstLastVectorAggregator<Double,SerializablePairLongDouble>
org.apache.druid.query.aggregation.firstlast.DoubleFirstLastVectorAggregator
- All Implemented Interfaces:
VectorAggregator
- Direct Known Subclasses:
DoubleFirstVectorAggregator,DoubleLastVectorAggregator
public class DoubleFirstLastVectorAggregator
extends FirstLastVectorAggregator<Double,SerializablePairLongDouble>
Vectorized version of on heap aggregator for column selectors with type DOUBLE.
-
Field Summary
Fields inherited from class org.apache.druid.query.aggregation.firstlast.FirstLastVectorAggregator
NULLITY_OFFSET, VALUE_OFFSET -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDoubleFirstLastVectorAggregator(VectorValueSelector timeSelector, VectorObjectSelector objectSelector, SelectionPredicate selectionPredicate) protectedDoubleFirstLastVectorAggregator(VectorValueSelector timeSelector, VectorValueSelector valueSelector, SelectionPredicate selectionPredicate) -
Method Summary
Modifier and TypeMethodDescriptionget(ByteBuffer buf, int position) voidinit(ByteBuffer buf, int position) protected voidputNull(ByteBuffer buf, int position, long time) protected voidputValue(ByteBuffer buf, int position, long time, Double value) Sets the value at the position.protected voidputValue(ByteBuffer buf, int position, long time, VectorValueSelector valueSelector, int index) Sets the value represented by the valueSelector at the given index.protected SerializablePairLongDoublereadPairFromVectorSelectors(boolean[] timeNullityVector, long[] timeVector, Object[] maybeFoldedObjects, int index) Methods inherited from class org.apache.druid.query.aggregation.firstlast.FirstLastVectorAggregator
aggregate, aggregate, closeMethods 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.VectorAggregator
relocate
-
Constructor Details
-
DoubleFirstLastVectorAggregator
protected DoubleFirstLastVectorAggregator(VectorValueSelector timeSelector, VectorObjectSelector objectSelector, SelectionPredicate selectionPredicate) -
DoubleFirstLastVectorAggregator
protected DoubleFirstLastVectorAggregator(VectorValueSelector timeSelector, VectorValueSelector valueSelector, SelectionPredicate selectionPredicate)
-
-
Method Details
-
init
Description copied from interface:VectorAggregator -
get
Description copied from interface:VectorAggregator -
putValue
Description copied from class:FirstLastVectorAggregatorSets the value at the position. Subclasses can assume that the value isn't null 'position' refers to the location where the value of the pair will get updated (as opposed to the beginning of the serialized pair) It is only used if objectSelector is supplied- Specified by:
putValuein classFirstLastVectorAggregator<Double,SerializablePairLongDouble>
-
putValue
protected void putValue(ByteBuffer buf, int position, long time, VectorValueSelector valueSelector, int index) Description copied from class:FirstLastVectorAggregatorSets the value represented by the valueSelector at the given index. A slightly redundant method toFirstLastVectorAggregator.putValue(ByteBuffer, int, long, Object)to avoid autoboxing for the numeric types. Subclasses can assume that valueSelector.getNullVector[index] is false (i.e. the value represented at the index isn't null) It is used if valueSelector is supplied- Specified by:
putValuein classFirstLastVectorAggregator<Double,SerializablePairLongDouble>
-
putNull
- Specified by:
putNullin classFirstLastVectorAggregator<Double,SerializablePairLongDouble>
-
readPairFromVectorSelectors
protected SerializablePairLongDouble readPairFromVectorSelectors(boolean[] timeNullityVector, long[] timeVector, Object[] maybeFoldedObjects, int index) - Specified by:
readPairFromVectorSelectorsin classFirstLastVectorAggregator<Double,SerializablePairLongDouble>
-