Henry2SS commented on a change in pull request #7403:
URL: https://github.com/apache/incubator-doris/pull/7403#discussion_r775036629
##########
File path:
fe/fe-core/src/main/java/org/apache/doris/blockrule/SqlBlockRuleMgr.java
##########
@@ -107,12 +108,22 @@ public void alterSqlBlockRule(AlterSqlBlockRuleStmt stmt)
throws DdlException {
throw new DdlException("the sql block rule " + ruleName + "
not exist");
}
SqlBlockRule originRule = nameToSqlBlockRuleMap.get(ruleName);
+ SqlBlockUtil.checkAlterValidate(sqlBlockRule, originRule);
if (StringUtils.isEmpty(sqlBlockRule.getSql())) {
sqlBlockRule.setSql(originRule.getSql());
}
if (StringUtils.isEmpty(sqlBlockRule.getSqlHash())) {
sqlBlockRule.setSqlHash(originRule.getSqlHash());
}
+ if
(StringUtils.isEmpty(sqlBlockRule.getPartitionNum().toString())) {
Review comment:
NO.
`sqlBlockRule ` in this place, is from `SqlBlockRule sqlBlockRule =
SqlBlockRule.fromAlterStmt(stmt);`
and `stmt` is an instance of AlterSqlBlockRuleStmt.
In the method called `setProperties` in AlterSqlBlockRuleStmt.java, all the
properties are set default values.
And I've tested ALTER:
1. from lower version to this version, it is compatible;
2. ALTER operation work well
3. ALTER operatio can report relevant exceptions
--
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]