Skip to content

Commit

Permalink
Make schema evolution add columns idempotent
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-xhuang authored Oct 24, 2023
1 parent 3f99a07 commit d7e5a59
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ public boolean hasSchemaEvolutionPermission(String tableName, String role) {
public void appendColumnsToTable(String tableName, Map<String, String> columnToType) {
checkConnection();
InternalUtils.assertNotEmpty("tableName", tableName);
StringBuilder appendColumnQuery = new StringBuilder("alter table identifier(?) add column ");
StringBuilder appendColumnQuery = new StringBuilder("alter table identifier(?) add column if not exists ");
boolean first = true;
StringBuilder logColumn = new StringBuilder("[");
for (String columnName : columnToType.keySet()) {
Expand Down

0 comments on commit d7e5a59

Please sign in to comment.