liran-funaro commented on a change in pull request #11124:
URL: https://github.com/apache/druid/pull/11124#discussion_r620163635
##########
File path:
processing/src/main/java/org/apache/druid/query/aggregation/BufferAggregator.java
##########
@@ -93,64 +96,6 @@
@Nullable
Object get(ByteBuffer buf, int position);
- /**
- * Returns the float representation of the given aggregate byte array
- *
- * Converts the given byte buffer representation into the intermediate
aggregate value.
- *
- * <b>Implementations must not change the position, limit or mark of the
given buffer</b>
- *
- * Implementations are only required to support this method if they are
aggregations which
- * have an {@link AggregatorFactory#getType()} ()} of {@link
org.apache.druid.segment.column.ValueType#FLOAT}.
- * If unimplemented, throwing an {@link UnsupportedOperationException} is
common and recommended.
- *
- * @param buf byte buffer storing the byte array representation of the
aggregate
- * @param position offset within the byte buffer at which the aggregate
value is stored
- * @return the float representation of the aggregate
- */
- float getFloat(ByteBuffer buf, int position);
-
- /**
- * Returns the long representation of the given aggregate byte array
- *
- * Converts the given byte buffer representation into the intermediate
aggregate value.
- *
- * <b>Implementations must not change the position, limit or mark of the
given buffer</b>
- *
- * Implementations are only required to support this method if they are
aggregations which
- * have an {@link AggregatorFactory#getType()} of of {@link
org.apache.druid.segment.column.ValueType#LONG}.
- * If unimplemented, throwing an {@link UnsupportedOperationException} is
common and recommended.
- *
- * @param buf byte buffer storing the byte array representation of the
aggregate
- * @param position offset within the byte buffer at which the aggregate
value is stored
- * @return the long representation of the aggregate
- */
- long getLong(ByteBuffer buf, int position);
-
- /**
- * Returns the double representation of the given aggregate byte array
- *
- * Converts the given byte buffer representation into the intermediate
aggregate value.
- *
- * <b>Implementations must not change the position, limit or mark of the
given buffer</b>
- *
- * Implementations are only required to support this method if they are
aggregations which
- * have an {@link AggregatorFactory#getType()} of of {@link
org.apache.druid.segment.column.ValueType#DOUBLE}.
- * If unimplemented, throwing an {@link UnsupportedOperationException} is
common and recommended.
- *
- * The default implementation casts {@link
BufferAggregator#getFloat(ByteBuffer, int)} to double.
- * This default method is added to enable smooth backward compatibility,
please re-implement it if your aggregators
- * work with numeric double columns.
- *
- * @param buf byte buffer storing the byte array representation of the
aggregate
- * @param position offset within the byte buffer at which the aggregate
value is stored
- * @return the double representation of the aggregate
- */
- default double getDouble(ByteBuffer buf, int position)
- {
- return (double) getFloat(buf, position);
- }
-
Review comment:
It is important for #10001 ( `OakIncrementalIndex` ) that
`BufferAggregator` will have the same API as `Aggregator`.
So please keep these methods. Also please keep `isNull()`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]