Code 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

Code before review:
public void alterSqlBlockRule(AlterSqlBlockRuleStmt stmt) throws AnalysisException, DdlException {
writeLock();
try {
SqlBlockRule sqlBlockRule = SqlBlockRule.fromAlterStmt(stmt);
String ruleName = sqlBlockRule.getName();
if (!existRule(ruleName)) {
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())) {
sqlBlockRule.setPartitionNum(originRule.getPartitionNum());
}
if (StringUtils.isEmpty(sqlBlockRule.getTabletNum().toString())) {
sqlBlockRule.setTabletNum(originRule.getTabletNum());
}
if (StringUtils.isEmpty(sqlBlockRule.getCardinality().toString())) {
sqlBlockRule.setCardinality(originRule.getCardinality());
}
if (sqlBlockRule.getGlobal() == null) {
sqlBlockRule.setGlobal(originRule.getGlobal());
}
if (sqlBlockRule.getEnable() == null) {
sqlBlockRule.setEnable(originRule.getEnable());
}
unprotectedUpdate(sqlBlockRule);
Catalog.getCurrentCatalog().getEditLog().logAlterSqlBlockRule(sqlBlockRule);
} finally {
writeUnlock();
}
}

Line under review: if (StringUtils.isEmpty(sqlBlockRule.getPartitionNum().toString())) {

Code after addressing the review:
public void alterSqlBlockRule(AlterSqlBlockRuleStmt stmt) throws AnalysisException, DdlException {
writeLock();
try {
SqlBlockRule sqlBlockRule = SqlBlockRule.fromAlterStmt(stmt);
String ruleName = sqlBlockRule.getName();
if (!existRule(ruleName)) {
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())) {
sqlBlockRule.setPartitionNum(originRule.getPartitionNum());
}
if (StringUtils.isEmpty(sqlBlockRule.getTabletNum().toString())) {
sqlBlockRule.setTabletNum(originRule.getTabletNum());
}
if (StringUtils.isEmpty(sqlBlockRule.getCardinality().toString())) {
sqlBlockRule.setCardinality(originRule.getCardinality());
}
if (sqlBlockRule.getGlobal() == null) {
sqlBlockRule.setGlobal(originRule.getGlobal());
}
if (sqlBlockRule.getEnable() == null) {
sqlBlockRule.setEnable(originRule.getEnable());
}
unprotectedUpdate(sqlBlockRule);
Catalog.getCurrentCatalog().getEditLog().logAlterSqlBlockRule(sqlBlockRule);
} finally {
writeUnlock();
}
}