maytasm3 commented on a change in pull request #9187: Implement ANY aggregator
URL: https://github.com/apache/druid/pull/9187#discussion_r367085110
##########
File path:
processing/src/main/java/org/apache/druid/query/aggregation/first/StringAggregatorUtils.java
##########
@@ -87,7 +87,7 @@ public static void writePair(
if (pair.rhs != null) {
mutationBuffer.position(position + Long.BYTES + Integer.BYTES);
- mutationBuffer.limit(maxStringBytes);
+ mutationBuffer.limit(position + Long.BYTES + Integer.BYTES +
maxStringBytes);
Review comment:
This is to fix an existing bug i found. The limit method for buffer sets it
at absolute position. The correct limit should be maxStringBytes after where we
are writing the String to the buffer (which is position + Long.BYTES +
Integer.BYTES). Hence, limit should be position + Long.BYTES + Integer.BYTES +
maxStringBytes
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]