Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary purgeData parameter of TrinoCatalog.dropTable #11167

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 @@ -829,7 +829,7 @@ public Optional<Object> getInfo(ConnectorTableHandle tableHandle)
@Override
public void dropTable(ConnectorSession session, ConnectorTableHandle tableHandle)
{
catalog.dropTable(session, ((IcebergTableHandle) tableHandle).getSchemaTableName(), true);
catalog.dropTable(session, ((IcebergTableHandle) tableHandle).getSchemaTableName());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Transaction newCreateTableTransaction(
String location,
Map<String, String> properties);

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

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ public List<SchemaTableName> listTables(ConnectorSession session, Optional<Strin
}

@Override
public void dropTable(ConnectorSession session, SchemaTableName schemaTableName, boolean purgeData)
public void dropTable(ConnectorSession session, SchemaTableName schemaTableName)
{
// TODO: support path override in Iceberg table creation: https://github.com/trinodb/trino/issues/8861
Table table = loadTable(session, schemaTableName);
Expand All @@ -304,7 +304,7 @@ public void dropTable(ConnectorSession session, SchemaTableName schemaTableName,
table.properties().containsKey(WRITE_METADATA_LOCATION)) {
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);
metastore.dropTable(schemaTableName.getSchemaName(), schemaTableName.getTableName(), true);
}

@Override
Expand Down