Unverified Commit 299b950b authored by Licho's avatar Licho Committed by GitHub

fix: ClassLoader empty (#2632)

* fix: ClassLoader null * Spotless Apply --------- Co-authored-by: 's avatarleechor <leechor@users.noreply.github.com>
parent c76087de
......@@ -139,6 +139,8 @@ public abstract class Executor {
tableEnvironment = createCustomTableEnvironment(classLoader);
CustomTableEnvironmentContext.set(tableEnvironment);
// after 1.18 version, this two injection should be removed
tableEnvironment.injectParser(
new CustomParserImpl(tableEnvironment.getPlanner().getParser()));
tableEnvironment.injectExtendedExecutor(
......@@ -286,10 +288,6 @@ public abstract class Executor {
return statementSet.explain();
}
public boolean parseAndLoadConfiguration(String statement) {
return tableEnvironment.parseAndLoadConfiguration(statement, setConfig);
}
public List<LineageRel> getLineage(String statement) {
return tableEnvironment.getLineage(statement);
}
......
......@@ -20,7 +20,6 @@
package org.dinky.explainer;
import org.dinky.assertion.Asserts;
import org.dinky.classloader.DinkyClassLoader;
import org.dinky.constant.FlinkSQLConstant;
import org.dinky.data.model.LineageRel;
import org.dinky.data.model.SystemConfiguration;
......@@ -127,7 +126,7 @@ public class Explainer {
if (operationType.equals(SqlType.ADD)) {
AddJarSqlParseStrategy.getAllFilePath(statement)
.forEach(t -> jobManager.getUdfPathContextHolder().addOtherPlugins(t));
((DinkyClassLoader) executor.getCustomTableEnvironment().getUserClassLoader())
(executor.getDinkyClassLoader())
.addURLs(URLUtils.getURLs(
jobManager.getUdfPathContextHolder().getOtherPluginsFiles()));
} else if (operationType.equals(SqlType.ADD_JAR)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment