asdf2014 commented on a change in pull request #5957: Various changes URL: https://github.com/apache/incubator-druid/pull/5957#discussion_r200843245
########## File path: processing/src/main/java/io/druid/query/aggregation/JavaScriptAggregatorFactory.java ########## @@ -353,6 +354,15 @@ public double aggregate(final double current, final BaseObjectColumnValueSelecto return Context.toNumber(res); } + private Object[] arrayToObjectArray(Object array) + { + final Object[] objectArray = new Object[Array.getLength(array)]; + for (int j = 0; j < Array.getLength(array); j++) { Review comment: Maybe this line of code can become this way? ```java int len = Array.getLength(array); final Object[] objectArray = new Object[len]; for (int j = 0; j < len; j++) {...} ``` Cuz, `for (int j = 0; j < Array.getLength(array); j++) {...}` this code style will call `Array.getLength` method for each `for` loop. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@druid.apache.org For additional commands, e-mail: dev-h...@druid.apache.org