himanshug commented on a change in pull request #7588: multi-value string column support for expressions URL: https://github.com/apache/incubator-druid/pull/7588#discussion_r290005426
########## File path: core/src/main/java/org/apache/druid/math/expr/Parser.java ########## @@ -60,13 +65,32 @@ } } FUNCTIONS = ImmutableMap.copyOf(functionMap); + + Map<String, ApplyFunction> applyFunctionMap = new HashMap<>(); + for (Class clazz : ApplyFunction.class.getClasses()) { + if (!Modifier.isAbstract(clazz.getModifiers()) && ApplyFunction.class.isAssignableFrom(clazz)) { + try { + ApplyFunction function = (ApplyFunction) clazz.newInstance(); + applyFunctionMap.put(StringUtils.toLowerCase(function.name()), function); + } + catch (Exception e) { + log.info("failed to instantiate " + clazz.getName() + ".. ignoring", e); Review comment: I know its a copy/paste from function, but I think it should be termed as error. Also, "e" should be first argument , currently I think it is just getting ignored. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org For additional commands, e-mail: commits-h...@druid.apache.org