You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2020/01/17 12:37:03 UTC

[GitHub] [calcite] gr4ve commented on issue #1766: [CALCITE-3745] UnitCompiler can not find required class information.

gr4ve commented 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:
users@infra.apache.org


With regards,
Apache Git Services