clintropolis commented on a change in pull request #11186:
URL: https://github.com/apache/druid/pull/11186#discussion_r624865281



##########
File path: 
processing/src/main/java/org/apache/druid/query/topn/types/StringTopNColumnAggregatesProcessor.java
##########
@@ -108,7 +116,7 @@ public long scanAndAggregate(
       Aggregator[][] rowSelector
   )
   {
-    if (selector.getValueCardinality() != 
DimensionDictionarySelector.CARDINALITY_UNKNOWN) {
+    if 
(capabilities.isDictionaryEncoded().and(capabilities.areDictionaryValuesUnique()).isTrue())
 {

Review comment:
       I've updated the check, and added a comment to try to explain what is 
going on with the aggregation algorithm selection and why




-- 
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]

Reply via email to