You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a MATERIALIZED VIEW was previously created with a storage table, and the latest version has enabled iceberg.materialized-views.hide-storage-table, attempting to DROP the MATERIALIZED VIEW will result in the following error:
java.lang.IllegalStateException: Storage location missing in definition of materialized view sample_mv
at com.google.common.base.Preconditions.checkState(Preconditions.java:512)
at io.trino.plugin.iceberg.catalog.hms.TrinoHiveCatalog.dropMaterializedView(TrinoHiveCatalog.java:731)
at io.trino.plugin.iceberg.IcebergMetadata.dropMaterializedView(IcebergMetadata.java:2855)
at io.trino.plugin.base.classloader.ClassLoaderSafeConnectorMetadata.dropMaterializedView(ClassLoaderSafeConnectorMetadata.java:1125)
at io.trino.tracing.TracingConnectorMetadata.dropMaterializedView(TracingConnectorMetadata.java:1283)
at io.trino.metadata.MetadataManager.dropMaterializedView(MetadataManager.java:1579)
I think this block of code should be relocated to the else block.
@rstyp I found some other problems in this code today as well. Not as bad as this one, but enough that I've put up a PR with the patch you suggested above and a fix for what I found: #20892
If a
MATERIALIZED VIEW
was previously created with a storage table, and the latest version has enablediceberg.materialized-views.hide-storage-table
, attempting to DROP the MATERIALIZED VIEW will result in the following error:I think this block of code should be relocated to the
else
block.trino/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/hms/TrinoHiveCatalog.java
Lines 730 to 741 in bc85d90
The text was updated successfully, but these errors were encountered: