kkrugler opened a new issue #6642:
URL: https://github.com/apache/incubator-pinot/issues/6642
Currently the code in `DistinctCountHLLAggregationFunction.aggregate()`
looks like:
``` java
public void aggregate(int length, AggregationResultHolder
aggregationResultHolder,
Map<ExpressionContext, BlockValSet> blockValSetMap) {
BlockValSet blockValSet = blockValSetMap.get(_expression);
DataType valueType = blockValSet.getValueType();
if (valueType != DataType.BYTES) {
HyperLogLog hyperLogLog =
getDefaultHyperLogLog(aggregationResultHolder);
switch (valueType) {
case INT:
int[] intValues = blockValSet.getIntValuesSV();
for (int i = 0; i < length; i++) {
hyperLogLog.offer(intValues[i]);
}
break;
case LONG:
...
```
Note the call to `blockValueSet.getIntValuesSV()`. It should check if
`BlockValueSet.isSingleValue()` returns false, and if so then use
`BlockValueSet.getIntValuesMV()`. This will return a two dimensional array
(`[][]`) of values that need iteration.
The same change is needed for all of the other value types.
----------------------------------------------------------------
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]