gortiz commented on code in PR #12302: URL: https://github.com/apache/pinot/pull/12302#discussion_r1463232171
########## pinot-common/src/main/java/org/apache/pinot/common/function/FunctionRegistry.java: ########## @@ -94,83 +154,195 @@ private FunctionRegistry() { public static void init() { } + @VisibleForTesting + public static void registerFunction(Method method) { + registerFunction(method, Collections.singleton(method.getName()), false, false); Review Comment: When this function will be called? Specifically, this method seems to be not thread safe. If some thread is registering a function and another is looking for functions, the behavior is not specified. Is that something that can happen? It looks like the method is public for testing proposes, so I would assume the production code won't call this method but: - We should specify that in the Javadoc of this method - Does it mean we cannot run tests concurrently? -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org