kmozaid commented on code in PR #16836:
URL: https://github.com/apache/pinot/pull/16836#discussion_r2358300568
##########
pinot-core/src/main/java/org/apache/pinot/core/query/aggregation/function/AvgMVAggregationFunction.java:
##########
@@ -43,8 +45,24 @@ public AggregationFunctionType getType() {
public void aggregate(int length, AggregationResultHolder
aggregationResultHolder,
Map<ExpressionContext, BlockValSet> blockValSetMap) {
BlockValSet blockValSet = blockValSetMap.get(_expression);
- double[][] valuesArray = blockValSet.getDoubleValuesMV();
+ if (blockValSet.getValueType() == DataType.BYTES) {
+ // Serialized AvgPair
+ byte[][] bytesValues = blockValSet.getBytesValuesSV();
Review Comment:
@Jackie-Jiang This would only be tested in Integration Tests, I don't see a
away to test the code block with a unit test. I tried modifying
SerializedBytesQueriesTest to support AVGMV on a multi-value field, but
`blockValSet.getBytesValuesSV();` code block fails as we expect single value
but its not single value (it would be single value only when data is read from
startree index).
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]