Skip to content

Commit db54bfd

Browse files
committed
Metacat normalizes to lower case table names.
1 parent 0d00cbb commit db54bfd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

metacat-main/src/main/java/com/netflix/metacat/main/api/MetacatV1Resource.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public TableDto createTable(String catalogName, String databaseName, String tabl
139139
return requestWrapper(name, "createTable", () -> {
140140
checkArgument(table != null, "Table cannot be null");
141141
checkArgument(tableName != null && !tableName.isEmpty(), "table name is required");
142-
checkArgument(table.getName() != null && tableName.equals(table.getName().getTableName()),
142+
checkArgument(table.getName() != null && tableName.equalsIgnoreCase(table.getName().getTableName()),
143143
"Table name does not match the name in the table");
144144

145145
eventBus.post(new MetacatCreateTablePreEvent(name, metacatContext));
@@ -315,7 +315,7 @@ public TableDto updateTable(String catalogName, String databaseName, String tabl
315315
return requestWrapper(name, "updateTable", () -> {
316316
checkArgument(table != null, "Table cannot be null");
317317
checkArgument(tableName != null && !tableName.isEmpty(), "table name is required");
318-
checkArgument(table.getName() != null && tableName.equals(table.getName().getTableName()),
318+
checkArgument(table.getName() != null && tableName.equalsIgnoreCase(table.getName().getTableName()),
319319
"Table name does not match the name in the table");
320320

321321
eventBus.post(new MetacatUpdateTablePreEvent(name, table, metacatContext));

0 commit comments

Comments
 (0)