Jackie-Jiang commented on code in PR #16836:
URL: https://github.com/apache/pinot/pull/16836#discussion_r2422136962
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/TableConfigUtils.java:
##########
@@ -1361,13 +1361,15 @@ private static void
validateStarTreeIndexConfigs(List<StarTreeIndexConfig> starT
}
}
- // Validate all referenced columns exist in the schema and are
single-valued
+ Set<String> dimensionSplitOrderColumns = new
HashSet<>(dimensionsSplitOrder);
Review Comment:
Not introduced in this PR, but seems we don't need to keep
`referencedColumns` outside of the loop. Consider keeping dimensions and
aggregated columns separately for readability
##########
pinot-core/src/main/java/org/apache/pinot/core/query/aggregation/function/CountMVAggregationFunction.java:
##########
@@ -53,6 +53,17 @@ public List<ExpressionContext> getInputExpressions() {
public void aggregate(int length, AggregationResultHolder
aggregationResultHolder,
Map<ExpressionContext, BlockValSet> blockValSetMap) {
BlockValSet blockValSet = blockValSetMap.get(_expression);
+
+ if (blockValSet.isSingleValue()) {
Review Comment:
It's fine as long as we cover it under integration test
##########
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:
Consider doing the `isSIngleValue()` check to be consistent as other
functions
Suggest adding some comments explaining this logic is for star-tree index
usage. Same for other functions
--
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]