Skip to content

Commit

Permalink
Rename a method in TestDeltaLakeBasic
Browse files Browse the repository at this point in the history
  • Loading branch information
ebyhr committed Sep 20, 2023
1 parent 5b9abd6 commit 5f65375
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ protected QueryRunner createQueryRunner()
public void registerTables()
{
for (ResourceTable table : Iterables.concat(PERSON_TABLES, OTHER_TABLES)) {
String dataPath = getTableLocation(table.resourcePath()).toExternalForm();
String dataPath = getResourceLocation(table.resourcePath()).toExternalForm();
getQueryRunner().execute(
format("CALL system.register_table('%s', '%s', '%s')", getSession().getSchema().orElseThrow(), table.tableName(), dataPath));
}
}

private URL getTableLocation(String resourcePath)
private URL getResourceLocation(String resourcePath)
{
return getClass().getClassLoader().getResource(resourcePath);
}
Expand Down Expand Up @@ -656,7 +656,7 @@ public void testCorruptedExternalTableLocation()
// create a bad_person table which is based on person table in temporary location
String tableName = "bad_person_" + randomNameSuffix();
Path tableLocation = Files.createTempFile(tableName, null);
copyDirectoryContents(Path.of(getTableLocation("databricks73/person").toURI()), tableLocation);
copyDirectoryContents(Path.of(getResourceLocation("databricks73/person").toURI()), tableLocation);
getQueryRunner().execute(
format("CALL system.register_table('%s', '%s', '%s')", getSession().getSchema().orElseThrow(), tableName, tableLocation));
testCorruptedTableLocation(tableName, tableLocation, false);
Expand Down

0 comments on commit 5f65375

Please sign in to comment.