Class SingleStringFirstLastDimensionVectorAggregator
java.lang.Object
org.apache.druid.query.aggregation.firstlast.FirstLastVectorAggregator<String,SerializablePairLongString>
org.apache.druid.query.aggregation.firstlast.SingleStringFirstLastDimensionVectorAggregator
- All Implemented Interfaces:
VectorAggregator
- Direct Known Subclasses:
SingleStringFirstDimensionVectorAggregator,SingleStringLastDimensionVectorAggregator
public class SingleStringFirstLastDimensionVectorAggregator
extends FirstLastVectorAggregator<String,SerializablePairLongString>
-
Field Summary
Fields inherited from class org.apache.druid.query.aggregation.firstlast.FirstLastVectorAggregator
NULLITY_OFFSET, VALUE_OFFSET -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSingleStringFirstLastDimensionVectorAggregator(VectorValueSelector timeSelector, SingleValueDimensionVectorSelector singleValueDimensionVectorSelector, int maxStringBytes, SelectionPredicate selectionPredicate) -
Method Summary
Modifier and TypeMethodDescriptionget(ByteBuffer buf, int position) Doesnt need to handle the null handling because that is taken care of while inserting the value, therefore in replaceWithDefault mode, it is always going to be non-nullvoidinit(ByteBuffer buf, int position) protected voidputNull(ByteBuffer buf, int position, long time) protected voidputValue(ByteBuffer buf, int position, long time, String 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 SerializablePairLongStringreadPairFromVectorSelectors(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
-
SingleStringFirstLastDimensionVectorAggregator
protected SingleStringFirstLastDimensionVectorAggregator(VectorValueSelector timeSelector, SingleValueDimensionVectorSelector singleValueDimensionVectorSelector, int maxStringBytes, SelectionPredicate selectionPredicate)
-
-
Method Details
-
init
Description copied from interface:VectorAggregator -
get
Doesnt need to handle the null handling because that is taken care of while inserting the value, therefore in replaceWithDefault mode, it is always going to be non-null -
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<String,SerializablePairLongString>
-
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<String,SerializablePairLongString>
-
putNull
- Specified by:
putNullin classFirstLastVectorAggregator<String,SerializablePairLongString>
-
readPairFromVectorSelectors
protected SerializablePairLongString readPairFromVectorSelectors(boolean[] timeNullityVector, long[] timeVector, Object[] maybeFoldedObjects, int index) - Specified by:
readPairFromVectorSelectorsin classFirstLastVectorAggregator<String,SerializablePairLongString>
-