From 28eafef72fdcbc030acd23dc411797c926a900e3 Mon Sep 17 00:00:00 2001 From: ChengJie1053 <18033291053@163.com> Date: Thu, 28 Dec 2023 14:08:25 +0800 Subject: [PATCH] Optimized code --- .../engineplugin/doris/executor/DorisDatasourceParser.java | 4 +--- .../engineplugin/doris/executor/DorisEngineConnExecutor.java | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/linkis-engineconn-plugins/doris/src/main/java/org/apache/linkis/engineplugin/doris/executor/DorisDatasourceParser.java b/linkis-engineconn-plugins/doris/src/main/java/org/apache/linkis/engineplugin/doris/executor/DorisDatasourceParser.java index 1a7fe7f729..b9a0986d21 100644 --- a/linkis-engineconn-plugins/doris/src/main/java/org/apache/linkis/engineplugin/doris/executor/DorisDatasourceParser.java +++ b/linkis-engineconn-plugins/doris/src/main/java/org/apache/linkis/engineplugin/doris/executor/DorisDatasourceParser.java @@ -46,9 +46,7 @@ public static Map queryDatasourceInfoByName( + datasourceName + "] datasource info ......"); LinkisDataSourceRemoteClient dataSourceClient = new LinkisDataSourceRemoteClient(); - DataSource dataSource = null; - - dataSource = + DataSource dataSource = dataSourceClient .getInfoPublishedByDataSourceName( GetInfoPublishedByDataSourceNameAction.builder() diff --git a/linkis-engineconn-plugins/doris/src/main/java/org/apache/linkis/engineplugin/doris/executor/DorisEngineConnExecutor.java b/linkis-engineconn-plugins/doris/src/main/java/org/apache/linkis/engineplugin/doris/executor/DorisEngineConnExecutor.java index efd8e6931e..dd0a88dddf 100644 --- a/linkis-engineconn-plugins/doris/src/main/java/org/apache/linkis/engineplugin/doris/executor/DorisEngineConnExecutor.java +++ b/linkis-engineconn-plugins/doris/src/main/java/org/apache/linkis/engineplugin/doris/executor/DorisEngineConnExecutor.java @@ -190,7 +190,7 @@ public ExecuteResponse executeLine(EngineExecutionContext engineExecutorContext, } logger.info("Doris engine begins to run code:\n {}", realCode); - checkRequiredParameter(code); + checkRequiredParameter(realCode); String testConnectionUrl = String.format(DORIS_URL_BOOTSTRAP, dorisHost, dorisHttpPort);