gr4ve edited a comment on issue #1766: [CALCITE-3745] UnitCompiler can not find required class information. URL: https://github.com/apache/calcite/pull/1766#issuecomment-575609374 > The fix looks strange. Thread.currentThread().getContextClassLoader() does not seem to be the right approach because getContextClassLoader might be unpredictable. Thread.currentThread().getContextClassLoader() will give user a choice, user can injects ClassLoader what he wants, It is very useful. For example, i have a project has two modules, first one is a system module, it uses system ClassLoader, most Calcite classes are loaded by this ClassLoader, the second one is a dynamic module, it has a child ClassLoader of system ClassLoader and contains some UDF classes and sql content, the UDFs are loaded by the second CLassLoader. When calcite trigger a compile procedure, the compiler will use the system loader to compile the generated source code and it will throw a CompileException, because the compiler can not find UDFs' class in first ClassLoader.
---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services
