Class StringFirstLastVectorAggregator
- java.lang.Object
-
- org.apache.druid.query.aggregation.firstlast.FirstLastVectorAggregator<String,SerializablePairLongString>
-
- org.apache.druid.query.aggregation.firstlast.StringFirstLastVectorAggregator
-
- All Implemented Interfaces:
VectorAggregator
- Direct Known Subclasses:
StringFirstVectorAggregator,StringLastVectorAggregator
public class StringFirstLastVectorAggregator extends FirstLastVectorAggregator<String,SerializablePairLongString>
-
-
Field Summary
-
Fields inherited from class org.apache.druid.query.aggregation.firstlast.FirstLastVectorAggregator
NULLITY_OFFSET, VALUE_OFFSET
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedStringFirstLastVectorAggregator(VectorValueSelector timeSelector, VectorObjectSelector objectSelector, int maxStringBytes, 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, 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, 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
-
StringFirstLastVectorAggregator
protected StringFirstLastVectorAggregator(@Nullable VectorValueSelector timeSelector, VectorObjectSelector objectSelector, int maxStringBytes, 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, String 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<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>
-
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<String,SerializablePairLongString>
-
putNull
protected void putNull(ByteBuffer buf, int position, long time)
- Specified by:
putNullin classFirstLastVectorAggregator<String,SerializablePairLongString>
-
readPairFromVectorSelectors
protected SerializablePairLongString readPairFromVectorSelectors(boolean[] timeNullityVector, long[] timeVector, Object[] maybeFoldedObjects, int index)
- Specified by:
readPairFromVectorSelectorsin classFirstLastVectorAggregator<String,SerializablePairLongString>
-
-