Skip to content

Commit

Permalink
[BugFix] fix backup and restore Case-Sensitive Table Name Conflict
Browse files Browse the repository at this point in the history
Signed-off-by: Rohit Satardekar <[email protected]>
  • Loading branch information
rohitrs1983 committed Sep 11, 2024
1 parent 4bd744c commit d89a71b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public Void visitBackupStatement(BackupStmt backupStmt, ConnectContext context)
String dbName = getDbName(backupStmt.getDbName(), context);
Database database = getDatabase(dbName, context);
analyzeLabelAndRepo(backupStmt.getLabel(), backupStmt.getRepoName());
Map<String, TableRef> tblPartsMap = Maps.newTreeMap(String.CASE_INSENSITIVE_ORDER);
Map<String, TableRef> tblPartsMap = Maps.newTreeMap();
List<TableRef> tableRefs = backupStmt.getTableRefs();
// If TableRefs is empty, it means that we do not specify any table in Backup stmt.
// We should backup all table in current database.
Expand Down Expand Up @@ -253,7 +253,7 @@ public Void visitShowBackupStatement(ShowBackupStmt showBackupStmt, ConnectConte
public Void visitRestoreStatement(RestoreStmt restoreStmt, ConnectContext context) {
List<TableRef> tableRefs = restoreStmt.getTableRefs();
Set<String> aliasSet = Sets.newHashSet();
Map<String, TableRef> tblPartsMap = Maps.newTreeMap(String.CASE_INSENSITIVE_ORDER);
Map<String, TableRef> tblPartsMap = Maps.newTreeMap();
for (TableRef tableRef : tableRefs) {
TableName tableName = tableRef.getName();

Expand Down

0 comments on commit d89a71b

Please sign in to comment.