Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1812,7 +1812,7 @@ public void dropTable(ConnectorSession session, ConnectorTableHandle tableHandle
Table table = metastore.getTable(handle.getSchemaName(), handle.getTableName())
.orElseThrow(() -> new TableNotFoundException(handle.getSchemaTableName()));

metastore.dropTable(session, handle.getSchemaName(), handle.getTableName(), table.getTableType().equals(EXTERNAL_TABLE.toString()));
metastore.dropTable(session, handle.getSchemaName(), handle.getTableName(), table.getTableType().equals(MANAGED_TABLE.toString()));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public interface DeltaLakeMetastore

void createTable(ConnectorSession session, Table table, PrincipalPrivileges principalPrivileges);

void dropTable(ConnectorSession session, String databaseName, String tableName, boolean externalTable);
void dropTable(ConnectorSession session, String databaseName, String tableName, boolean deleteData);

void renameTable(ConnectorSession session, SchemaTableName from, SchemaTableName to);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,13 @@ public void createTable(ConnectorSession session, Table table, PrincipalPrivileg
}

@Override
public void dropTable(ConnectorSession session, String databaseName, String tableName, boolean externalTable)
public void dropTable(ConnectorSession session, String databaseName, String tableName, boolean deleteData)
{
String tableLocation = getTableLocation(new SchemaTableName(databaseName, tableName), session);
delegate.dropTable(databaseName, tableName, true);
delegate.dropTable(databaseName, tableName, deleteData);
statisticsAccess.invalidateCache(tableLocation);
transactionLogAccess.invalidateCaches(tableLocation);
if (!externalTable) {
if (deleteData) {
try {
fileSystemFactory.create(session).deleteDirectory(tableLocation);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ public void createTable(ConnectorSession session, Table table, PrincipalPrivileg
}

@Override
public void dropTable(ConnectorSession session, String databaseName, String tableName, boolean externalTable)
public void dropTable(ConnectorSession session, String databaseName, String tableName, boolean deleteData)
{
throw new UnsupportedOperationException("Unimplemented");
}
Expand Down