morningman commented on code in PR #19540:
URL: https://github.com/apache/doris/pull/19540#discussion_r1210456557


##########
fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java:
##########
@@ -468,6 +472,10 @@ private void executeByNereids(TUniqueId queryId) throws 
Exception {
         context.setStartTime();
         profile.getSummaryProfile().setQueryBeginTime();
         context.setStmtId(STMT_ID_GENERATOR.incrementAndGet());
+
+        if (checkBlockRules()) {

Review Comment:
   I think the `checkBlockRules()` no need to return a `bool` value?



##########
fe/fe-core/src/main/java/org/apache/doris/analysis/CreateSqlBlockRuleStmt.java:
##########
@@ -116,6 +118,11 @@ public void analyze(Analyzer analyzer) throws 
UserException {
         // check properties
         CreateSqlBlockRuleStmt.checkCommonProperties(properties);
         setProperties(properties);
+
+        // avoid a rule block any ddl for itself
+        if (StringUtils.isNotEmpty(sql) && 
Pattern.compile(sql).matcher(this.ruleName).find()) {

Review Comment:
   why using `sql` to match the `ruleName`?



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to