yashmayya commented on code in PR #16983:
URL: https://github.com/apache/pinot/pull/16983#discussion_r2418256964
##########
pinot-core/src/main/java/org/apache/pinot/core/operator/query/NonScanBasedAggregationOperator.java:
##########
@@ -99,15 +99,23 @@ protected AggregationResultsBlock getNextBlock() {
break;
case MIN:
case MINMV:
- result = getMinValue(dataSource);
+ result = getMinValueNumeric(dataSource);
+ break;
+ case MINSTRING:
+ result = dataSource.getDictionary() != null ?
dataSource.getDictionary().getMinVal()
+ : dataSource.getDataSourceMetadata().getMinValue();
Review Comment:
If `dataSource.getDataSourceMetadata().getMinValue()` is `null` then we'll
not use this non scan based aggregation operator at all -
https://github.com/apache/pinot/blob/ce33d0d918485e3aae6b42ee72c428d02672409e/pinot-core/src/main/java/org/apache/pinot/core/plan/AggregationPlanNode.java#L193-L199
https://github.com/apache/pinot/blob/ce33d0d918485e3aae6b42ee72c428d02672409e/pinot-core/src/main/java/org/apache/pinot/core/plan/AggregationPlanNode.java#L116-L137
> I think in some old version the metadata might be wrong
Will the segment metadata not be fixed whenever the cluster is upgraded to a
newer version containing this new aggregation function and optimization? Or are
the segment metadata properties only updated on explicit reload / refresh?
> We can make MINSTRING and MAXSTING optimization on dictionary only
Sounds good, done.
--
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]