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

jiafengzheng pushed a commit to branch sql_block_fix
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 3bb8d45e9203ba40353193b778b51a03171871ec
Author: jiafeng.zhang <zhang...@gmail.com>
AuthorDate: Wed Sep 13 10:42:50 2023 +0800

    [fix](sql block)
    
    Here the SQL must go to the last space, otherwise there will be no match.
---
 .../main/java/org/apache/doris/analysis/CreateSqlBlockRuleStmt.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/analysis/CreateSqlBlockRuleStmt.java
 
b/fe/fe-core/src/main/java/org/apache/doris/analysis/CreateSqlBlockRuleStmt.java
index a53f7c944c..2d5e17e65d 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/analysis/CreateSqlBlockRuleStmt.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/analysis/CreateSqlBlockRuleStmt.java
@@ -126,7 +126,8 @@ public class CreateSqlBlockRuleStmt extends DdlStmt {
     }
 
     private void setProperties(Map<String, String> properties) throws 
UserException {
-        this.sql = properties.getOrDefault(SQL_PROPERTY, STRING_NOT_SET);
+        //Here the SQL must go to the last space, otherwise there will be no 
match.
+        this.sql = properties.getOrDefault(SQL_PROPERTY, 
STRING_NOT_SET).trim();
         this.sqlHash = properties.getOrDefault(SQL_HASH_PROPERTY, 
STRING_NOT_SET);
         String partitionNumString = properties.get(SCANNED_PARTITION_NUM);
         String tabletNumString = properties.get(SCANNED_TABLET_NUM);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to