Skip to content

Commit

Permalink
adds table assertion for Import
Browse files Browse the repository at this point in the history
  • Loading branch information
thoniTUB committed Sep 20, 2021
1 parent 1f410d3 commit 5c11a85
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ public static ImportJob create(
throw new BadRequestException(String.format("Table[%s] does not exist.", tableId));
}

// Ensure that Import and Table have the same schema
header.assertMatch(table);

final ImportId importId = new ImportId(table.getId(), header.getName());

if (namespace.getStorage().getImport(importId) != null) {
Expand Down

0 comments on commit 5c11a85

Please sign in to comment.