kgyrtkirk commented on code in PR #15012:
URL: https://github.com/apache/druid/pull/15012#discussion_r1330926155


##########
processing/src/main/java/org/apache/druid/query/dimension/ListFilteredDimensionSpec.java:
##########
@@ -92,15 +92,17 @@ public static IdMapping buildAllowListIdMapping(
       IndexedGetter<String> fn
   )
   {
-    final IdMapping.Builder builder = 
IdMapping.Builder.ofCardinality(values.size());
+    IdMapping.Builder builder;
     if (idLookup != null) {
+      builder = IdMapping.Builder.ofCardinality(values.size());

Review Comment:
   I was thinking this might get into similar troubles - but then noticed that: 
this branch uses a foreach on the `values` ; so it may make at-most `|values|` 
calls to `addMapping` - so I think its safe to leave it like this.
   
   ...hmm...but I'm wondering if I've misunderstood your comment: what did you 
mean by "impacted the same way" - the exception issue; or some perf stuff?



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

Reply via email to