This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-4.0 by this push:
     new c01a0f26e52 branch-4.0: [Fix](dictionary) Fix empty 
InsertIntoDictionaryCommand originSql #60631 (#60641)
c01a0f26e52 is described below

commit c01a0f26e5263f0f16a862d3133101d65e3e096f
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Thu Feb 12 10:10:35 2026 +0800

    branch-4.0: [Fix](dictionary) Fix empty InsertIntoDictionaryCommand 
originSql #60631 (#60641)
    
    Cherry-picked from #60631
    
    Co-authored-by: zclllyybb <[email protected]>
---
 .../main/java/org/apache/doris/blockrule/SqlBlockRuleMgr.java  |  3 +++
 .../java/org/apache/doris/dictionary/DictionaryManager.java    | 10 +++++-----
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/blockrule/SqlBlockRuleMgr.java 
b/fe/fe-core/src/main/java/org/apache/doris/blockrule/SqlBlockRuleMgr.java
index 62b6c70a46c..c6145a638e7 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/blockrule/SqlBlockRuleMgr.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/blockrule/SqlBlockRuleMgr.java
@@ -216,6 +216,9 @@ public class SqlBlockRuleMgr implements Writable {
      * Match SQL according to rules.
      **/
     public void matchSql(String originSql, String sqlHash, String user) throws 
AnalysisException {
+        if (originSql == null) {
+            return;
+        }
         if (Config.sql_block_rule_ignore_admin && (Auth.ROOT_USER.equals(user) 
|| Auth.ADMIN_USER.equals(user))) {
             return;
         }
diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/dictionary/DictionaryManager.java 
b/fe/fe-core/src/main/java/org/apache/doris/dictionary/DictionaryManager.java
index 040c63803d7..e503f4045ee 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/dictionary/DictionaryManager.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/dictionary/DictionaryManager.java
@@ -418,12 +418,12 @@ public class DictionaryManager extends MasterDaemon 
implements Writable {
         }
 
         // not use rerfresh command's executor to avoid potential problems.
-        StmtExecutor executor = InsertTask.makeStmtExecutor(ctx);
+        String insertSql = "insert into " + dictionary.getDbName() + "." + 
dictionary.getName() + " select * from "
+                + dictionary.getSourceCtlName() + "." + 
dictionary.getSourceDbName() + "."
+                + dictionary.getSourceTableName();
+        StmtExecutor executor = new StmtExecutor(ctx, insertSql);
         NereidsParser parser = new NereidsParser();
-        InsertIntoTableCommand baseCommand = (InsertIntoTableCommand) parser
-                .parseSingle("insert into " + dictionary.getDbName() + "." + 
dictionary.getName() + " select * from "
-                        + dictionary.getSourceCtlName() + "." + 
dictionary.getSourceDbName() + "."
-                        + dictionary.getSourceTableName());
+        InsertIntoTableCommand baseCommand = (InsertIntoTableCommand) 
parser.parseSingle(insertSql);
         LOG.info("Loading to dictionary {} with query {}. adaptive: {}", 
dictionary.getName(), ctx.queryId(),
                 adaptiveLoad);
         if (!baseCommand.getLabelName().isPresent()) {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to