Skip to content

Commit

Permalink
Remove unused return value from Iceberg catalog methods
Browse files Browse the repository at this point in the history
  • Loading branch information
electrum committed Feb 18, 2022
1 parent df0a16e commit 0790a5a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public interface TrinoCatalog
{
List<String> listNamespaces(ConnectorSession session);

boolean dropNamespace(ConnectorSession session, String namespace);
void dropNamespace(ConnectorSession session, String namespace);

Map<String, Object> loadNamespaceMetadata(ConnectorSession session, String namespace);

Expand All @@ -68,7 +68,7 @@ Transaction newCreateTableTransaction(
String location,
Map<String, String> properties);

boolean dropTable(ConnectorSession session, SchemaTableName schemaTableName, boolean purgeData);
void dropTable(ConnectorSession session, SchemaTableName schemaTableName, boolean purgeData);

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public void createNamespace(ConnectorSession session, String namespace, Map<Stri
}

@Override
public boolean dropNamespace(ConnectorSession session, String namespace)
public void dropNamespace(ConnectorSession session, String namespace)
{
// basic sanity check to provide a better error message
if (!listTables(session, Optional.of(namespace)).isEmpty() ||
Expand Down Expand Up @@ -239,7 +239,6 @@ public boolean dropNamespace(ConnectorSession session, String namespace)
}).orElse(deleteSchemaLocationsFallback);

metastore.dropDatabase(namespace, deleteData);
return true;
}

@Override
Expand Down Expand Up @@ -296,7 +295,7 @@ public List<SchemaTableName> listTables(ConnectorSession session, Optional<Strin
}

@Override
public boolean dropTable(ConnectorSession session, SchemaTableName schemaTableName, boolean purgeData)
public void dropTable(ConnectorSession session, SchemaTableName schemaTableName, boolean purgeData)
{
// TODO: support path override in Iceberg table creation: https://github.com/trinodb/trino/issues/8861
Table table = loadTable(session, schemaTableName);
Expand All @@ -306,7 +305,6 @@ public boolean dropTable(ConnectorSession session, SchemaTableName schemaTableNa
throw new TrinoException(NOT_SUPPORTED, "Table " + schemaTableName + " contains Iceberg path override properties and cannot be dropped from Trino");
}
metastore.dropTable(schemaTableName.getSchemaName(), schemaTableName.getTableName(), purgeData);
return true;
}

@Override
Expand Down

0 comments on commit 0790a5a

Please sign in to comment.