Class StringColumnFloatBufferAggregatorWrapper
- java.lang.Object
-
- org.apache.druid.query.aggregation.DelegatingBufferAggregator
-
- org.apache.druid.query.aggregation.StringColumnFloatBufferAggregatorWrapper
-
- All Implemented Interfaces:
BufferAggregator
,HotLoopCallee
public class StringColumnFloatBufferAggregatorWrapper extends DelegatingBufferAggregator
This class can be used to wrap Float BufferAggregator that consume float type columns to handle String type.
-
-
Field Summary
-
Fields inherited from class org.apache.druid.query.aggregation.DelegatingBufferAggregator
delegate
-
-
Constructor Summary
Constructors Constructor Description StringColumnFloatBufferAggregatorWrapper(BaseObjectColumnValueSelector selector, Function<BaseFloatColumnValueSelector,BufferAggregator> delegateBuilder, float nullValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
aggregate(ByteBuffer buf, int position)
Aggregates metric values into the given aggregate byte representation Implementations of this method must read in the aggregate value from the buffer at the given position, aggregate the next element of data and write the updated aggregate value back into the buffer.-
Methods inherited from class org.apache.druid.query.aggregation.DelegatingBufferAggregator
close, get, getDouble, getFloat, getLong, init, inspectRuntimeShape, isNull, relocate
-
-
-
-
Constructor Detail
-
StringColumnFloatBufferAggregatorWrapper
public StringColumnFloatBufferAggregatorWrapper(BaseObjectColumnValueSelector selector, Function<BaseFloatColumnValueSelector,BufferAggregator> delegateBuilder, float nullValue)
-
-
Method Detail
-
aggregate
public void aggregate(ByteBuffer buf, int position)
Description copied from interface:BufferAggregator
Aggregates metric values into the given aggregate byte representation Implementations of this method must read in the aggregate value from the buffer at the given position, aggregate the next element of data and write the updated aggregate value back into the buffer. Implementations must not change the position, limit or mark of the given buffer- Specified by:
aggregate
in interfaceBufferAggregator
- Overrides:
aggregate
in classDelegatingBufferAggregator
- Parameters:
buf
- byte buffer storing the byte array representation of the aggregateposition
- offset within the byte buffer at which the current aggregate value is stored
-
-