apache / iceberg-python

Apache PyIceberg
https://py.iceberg.apache.org/
Apache License 2.0
331 stars 121 forks source link

UncheckedSQLException while deleting table #901

Closed ArijitSinghEDA closed 1 week ago

ArijitSinghEDA commented 1 week ago

Question

I am running a delete command like this:

# catalog is already loaded

catalog.drop_table("ns.tbl")

I am facing the following error:

pyiceberg.exceptions.ServerError: UncheckedSQLException: Failed to execute: DELETE FROM iceberg_tables WHERE catalog_name = ? AND table_namespace  = ? AND table_name = ? AND (iceberg_type = 'TABLE' OR iceberg_type IS NULL)

I am using pyiceberg==0.6.1

kevinjqliu commented 1 week ago

Thanks for the report!

Do you mind adding a code snippet to help reproduce this issue? It looks like this is related to the SQL Catalog drop_table function https://github.com/apache/iceberg-python/blob/7dff359e0515839fbe24fac2108dcb2d64694b7a/pyiceberg/catalog/sql.py#L295

ArijitSinghEDA commented 1 week ago

Hi @kevinjqliu

On further investigation, it was a problem with the standalone iceberg server. It has been rectified now.

Thank you for taking out your time.