Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line numberDiff line numberDiff line change
Expand Up@@ -3146,7 +3146,9 @@ private TRestoreSnapshotResult restoreSnapshotImpl(TRestoreSnapshotRequest reque
//instantiate RestoreCommand
LabelNameInfo labelNameInfo = new LabelNameInfo(label.getDbName(), label.getLabelName());
List<TableRefInfo> tableRefInfos = new ArrayList<>();
for (TableRef tableRef : restoreTableRefClause.getTableRefList()) {
List<TableRef> tableRefList = restoreTableRefClause == null
? new ArrayList<>() : restoreTableRefClause.getTableRefList();
for (TableRef tableRef : tableRefList) {
TableName tableName = tableRef.getName();
String[] aliases = tableRef.getAliases();
PartitionNames partitionNames = tableRef.getPartitionNames();
Expand DownExpand Up@@ -3208,7 +3210,7 @@ private TRestoreSnapshotResult restoreSnapshotImpl(TRestoreSnapshotRequest reque
ctx.setCurrentUserIdentity(UserIdentity.createAnalyzedUserIdentWithIp(fullUserName, "%"));
ctx.setThreadLocalInfo();
restoreCommand.validate(ctx);
ctx.getEnv().getBackupHandler().process(restoreCommand);
Env.getCurrentEnv().getBackupHandler().process(restoreCommand);
} catch (UserException e) {
LOG.warn("failed to restore: {}, command: {}", e.getMessage(), restoreCommand, e);
status.setStatusCode(TStatusCode.ANALYSIS_ERROR);
Expand Down