Jackie-Jiang commented on a change in pull request #5531: URL: https://github.com/apache/incubator-pinot/pull/5531#discussion_r437745012
########## File path: pinot-common/src/main/java/org/apache/pinot/common/function/FunctionRegistry.java ########## @@ -39,62 +38,63 @@ */ public class FunctionRegistry { private static final Logger LOGGER = LoggerFactory.getLogger(FunctionRegistry.class); - private static final Map<String, FunctionInfo> _functionInfoMap = new HashMap<>(); + private static final Map<String, FunctionInfo> FUNCTION_INFO_MAP = new HashMap<>(); + + private static boolean _initialized = false; /** - * Given a function name, asserts that a corresponding function was registered during construction and returns it + * Initializes the FunctionRegistry by registering the scalar functions via reflection. + * NOTE: In order to plugin methods using reflection, the methods should be inside a class that includes ".function." Review comment: There is no easy way to enforce this for user-side classes because we can only load the classes at runtime. Added the log for all the registered functions so that at least we can catch the problem if the class is not with the correct class path. ---------------------------------------------------------------- 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 --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org