Class LongFirstLastVectorAggregator
- java.lang.Object
-
- org.apache.druid.query.aggregation.firstlast.FirstLastVectorAggregator<Long,SerializablePairLongLong>
-
- org.apache.druid.query.aggregation.firstlast.LongFirstLastVectorAggregator
-
- All Implemented Interfaces:
VectorAggregator
- Direct Known Subclasses:
LongFirstVectorAggregator,LongLastVectorAggregator
public class LongFirstLastVectorAggregator extends FirstLastVectorAggregator<Long,SerializablePairLongLong>
Vectorized version of on heap 'last' aggregator for column selectors with type LONG..
-
-
Field Summary
-
Fields inherited from class org.apache.druid.query.aggregation.firstlast.FirstLastVectorAggregator
NULLITY_OFFSET, VALUE_OFFSET
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedLongFirstLastVectorAggregator(VectorValueSelector timeSelector, VectorObjectSelector objectSelector, SelectionPredicate selectionPredicate)protectedLongFirstLastVectorAggregator(VectorValueSelector timeSelector, VectorValueSelector valueSelector, SelectionPredicate selectionPredicate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectget(ByteBuffer buf, int position)voidinit(ByteBuffer buf, int position)protected voidputDefaultValue(ByteBuffer buf, int position, long time)Sets the default value for the type in the byte buffer at the given position.protected voidputNull(ByteBuffer buf, int position, long time)protected voidputValue(ByteBuffer buf, int position, long time, Long 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 SerializablePairLongLongreadPairFromVectorSelectors(boolean[] timeNullityVector, long[] timeVector, Object[] maybeFoldedObjects, int index)-
Methods inherited from class org.apache.druid.query.aggregation.firstlast.FirstLastVectorAggregator
aggregate, aggregate, close
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.druid.query.aggregation.VectorAggregator
relocate
-
-
-
-
Constructor Detail
-
LongFirstLastVectorAggregator
protected LongFirstLastVectorAggregator(VectorValueSelector timeSelector, VectorObjectSelector objectSelector, SelectionPredicate selectionPredicate)
-
LongFirstLastVectorAggregator
protected LongFirstLastVectorAggregator(VectorValueSelector timeSelector, VectorValueSelector valueSelector, SelectionPredicate selectionPredicate)
-
-
Method Detail
-
init
public void init(ByteBuffer buf, int position)
Description copied from interface:VectorAggregator
-
get
@Nullable public Object get(ByteBuffer buf, int position)
Description copied from interface:VectorAggregator
-
putValue
protected void putValue(ByteBuffer buf, int position, long time, Long value)
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<Long,SerializablePairLongLong>
-
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<Long,SerializablePairLongLong>
-
putNull
protected void putNull(ByteBuffer buf, int position, long time)
- Specified by:
putNullin classFirstLastVectorAggregator<Long,SerializablePairLongLong>
-
putDefaultValue
protected void putDefaultValue(ByteBuffer buf, int position, long time)
Description copied from class:FirstLastVectorAggregatorSets the default value for the type in the byte buffer at the given position. It is only used when replaceNullWithDefault = true, therefore the callers don't need to handle any other case. 'position' refers to the location where the value of the pair will get updated (as opposed to the beginning of the serialized pair)- Specified by:
putDefaultValuein classFirstLastVectorAggregator<Long,SerializablePairLongLong>
-
readPairFromVectorSelectors
protected SerializablePairLongLong readPairFromVectorSelectors(boolean[] timeNullityVector, long[] timeVector, Object[] maybeFoldedObjects, int index)
- Specified by:
readPairFromVectorSelectorsin classFirstLastVectorAggregator<Long,SerializablePairLongLong>
-
-