FrankChen021 commented on a change in pull request #12105:
URL: https://github.com/apache/druid/pull/12105#discussion_r776538984



##########
File path: 
processing/src/main/java/org/apache/druid/segment/DimensionDictionary.java
##########
@@ -84,6 +84,19 @@ public T getValue(int id)
     }
   }
 
+  public void getValuesInto(int[] ids, T[] values)
+  {
+    lock.readLock().lock();
+    try {
+      for (int i = 0; i < ids.length; i++) {

Review comment:
       Since here you're copying the whole `ids` array to the input array 
without checking if the input `values` length matches the length of `ids`, I'm 
suggesting that this new method only accepts `ids` as parameter, and returns 
`T[]`




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