[fix](restore) fix Restore from __keep_on_local__ throws null pointer… (#26943)

Co-authored-by: walter <patricknicholas@foxmail.com>
Co-authored-by: hugoluo <hugoluo@tencent.com>
Co-authored-by: walter <patricknicholas@foxmail.com>
This commit is contained in:
yuxuan-luo
2023-12-05 10:55:28 +08:00
committed by GitHub
parent 3c97e69f3c
commit 3412a022f4
2 changed files with 82 additions and 0 deletions

View File

@ -112,6 +112,10 @@ public class RestoreStmt extends AbstractBackupStmt {
public void analyze(Analyzer analyzer) throws UserException {
if (repoName.equals(Repository.KEEP_ON_LOCAL_REPO_NAME)) {
isLocal = true;
if (jobInfo == null) {
ErrorReport.reportDdlException(ErrorCode.ERR_COMMON_ERROR,
"restore from the local repo via SQL call is not supported");
}
}
super.analyze(analyzer);
}