Class LongMaxBufferAggregator
java.lang.Object
org.apache.druid.query.aggregation.SimpleLongBufferAggregator
org.apache.druid.query.aggregation.LongMaxBufferAggregator
- All Implemented Interfaces:
BufferAggregator,HotLoopCallee
-
Method Summary
Modifier and TypeMethodDescriptionvoidaggregate(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.voidinit(ByteBuffer buf, int position) Initializes the buffer location Implementations of this method must initialize the byte buffer at the given position Implementations must not change the position, limit or mark of the given buffer This method must not exceed the number of bytes returned byAggregatorFactory.getMaxIntermediateSizeWithNulls()in the correspondingAggregatorFactoryMethods inherited from class org.apache.druid.query.aggregation.SimpleLongBufferAggregator
close, get, getDouble, getFloat, getLong, inspectRuntimeShapeMethods 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.BufferAggregator
isNull, relocate
-
Method Details
-
init
Description copied from interface:BufferAggregatorInitializes the buffer location Implementations of this method must initialize the byte buffer at the given position Implementations must not change the position, limit or mark of the given buffer This method must not exceed the number of bytes returned byAggregatorFactory.getMaxIntermediateSizeWithNulls()in the correspondingAggregatorFactory- Parameters:
buf- byte buffer to initializeposition- offset within the byte buffer for initialization
-
aggregate
Description copied from interface:BufferAggregatorAggregates 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- 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
-