Skip to content

Commit

Permalink
Use getStorageLocation in interface
Browse files Browse the repository at this point in the history
  • Loading branch information
vinishjail97 committed Dec 19, 2024
1 parent f9327f2 commit 15a54e6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ private <TABLE> CatalogSyncStatus syncCatalog(
catalogSyncClient.createDatabase(tableIdentifier.getDatabaseName());
}
TABLE catalogTable = catalogSyncClient.getTable(tableIdentifier);
String storageDescriptorLocation = catalogSyncClient.getStorageDescriptorLocation(catalogTable);
String storageDescriptorLocation = catalogSyncClient.getStorageLocation(catalogTable);
if (catalogTable == null) {
catalogSyncClient.createTable(table, tableIdentifier);
} else if (hasStorageDescriptorLocationChanged(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public interface CatalogSyncClient<TABLE> extends AutoCloseable {
String getCatalogName();

/** Returns the storage location of the table synced to the catalog. */
String getStorageDescriptorLocation(TABLE table);
String getStorageLocation(TABLE table);

/** Checks whether a database exists in the catalog. */
boolean hasDatabase(String databaseName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ void testSyncTable() {
when(mockClient2.getTable(tableIdentifier2)).thenReturn(null);
when(mockClient3.getTable(tableIdentifier3)).thenReturn(mockTable);

when(mockClient1.getStorageDescriptorLocation(any())).thenReturn("/tmp/test_changed");
when(mockClient2.getStorageDescriptorLocation(any())).thenReturn("/tmp/test");
when(mockClient3.getStorageDescriptorLocation(any())).thenReturn("/tmp/test");
when(mockClient1.getStorageLocation(any())).thenReturn("/tmp/test_changed");
when(mockClient2.getStorageLocation(any())).thenReturn("/tmp/test");
when(mockClient3.getStorageLocation(any())).thenReturn("/tmp/test");

when(mockClient4.getCatalogName()).thenReturn("catalogName4");

Expand Down

0 comments on commit 15a54e6

Please sign in to comment.