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



##########
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:
       Hmm, that is a good point, I guess it is implicit of the current state 
of things that the only things we have right now that report having unique 
dictionary ids are things with known cardinality, but I suppose this check 
needs both things to be true. I'll modify this check both conditions.




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