mirror of https://github.com/apache/druid.git
make it clear mergeAndStoreByteRegister has no side effects
This commit is contained in:
parent
a0c38f574b
commit
178a9aed40
|
@ -364,6 +364,7 @@ public abstract class HyperLogLogCollector implements Comparable<HyperLogLogColl
|
||||||
while(otherBuffer.hasRemaining()) {
|
while(otherBuffer.hasRemaining()) {
|
||||||
final int payloadStartPosition = otherBuffer.getShort() - other.getNumHeaderBytes();
|
final int payloadStartPosition = otherBuffer.getShort() - other.getNumHeaderBytes();
|
||||||
numNonZero += mergeAndStoreByteRegister(
|
numNonZero += mergeAndStoreByteRegister(
|
||||||
|
storageBuffer,
|
||||||
myPayloadStart + payloadStartPosition,
|
myPayloadStart + payloadStartPosition,
|
||||||
offsetDiff,
|
offsetDiff,
|
||||||
otherBuffer.get()
|
otherBuffer.get()
|
||||||
|
@ -378,6 +379,7 @@ public abstract class HyperLogLogCollector implements Comparable<HyperLogLogColl
|
||||||
int position = getPayloadBytePosition();
|
int position = getPayloadBytePosition();
|
||||||
while (otherBuffer.hasRemaining()) {
|
while (otherBuffer.hasRemaining()) {
|
||||||
numNonZero += mergeAndStoreByteRegister(
|
numNonZero += mergeAndStoreByteRegister(
|
||||||
|
storageBuffer,
|
||||||
position,
|
position,
|
||||||
offsetDiff,
|
offsetDiff,
|
||||||
otherBuffer.get()
|
otherBuffer.get()
|
||||||
|
@ -604,7 +606,8 @@ public abstract class HyperLogLogCollector implements Comparable<HyperLogLogColl
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private int mergeAndStoreByteRegister(
|
private static int mergeAndStoreByteRegister(
|
||||||
|
final ByteBuffer storageBuffer,
|
||||||
final int position,
|
final int position,
|
||||||
final int offsetDiff,
|
final int offsetDiff,
|
||||||
final byte byteToAdd
|
final byte byteToAdd
|
||||||
|
|
Loading…
Reference in New Issue