[Refine](sql block)unify exception catching for sql block (#17879)
currently, the AnalysisException throw by matchSql will catch immediately. however, the AnalysisException throws by checkLimitations will catch as UserException.
This commit is contained in:
@ -464,14 +464,8 @@ public class StmtExecutor implements ProfileWriter {
|
||||
}
|
||||
|
||||
private boolean checkBlockRules() throws AnalysisException {
|
||||
try {
|
||||
Env.getCurrentEnv().getSqlBlockRuleMgr().matchSql(
|
||||
originStmt.originStmt, context.getSqlHash(), context.getQualifiedUser());
|
||||
} catch (AnalysisException e) {
|
||||
LOG.warn(e.getMessage());
|
||||
context.getState().setError(e.getMysqlErrorCode(), e.getMessage());
|
||||
return true;
|
||||
}
|
||||
Env.getCurrentEnv().getSqlBlockRuleMgr().matchSql(
|
||||
originStmt.originStmt, context.getSqlHash(), context.getQualifiedUser());
|
||||
|
||||
// limitations: partition_num, tablet_num, cardinality
|
||||
List<ScanNode> scanNodeList = planner.getScanNodes();
|
||||
|
||||
Reference in New Issue
Block a user