File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
ice-rest-catalog/src/main/java/com/altinity/ice/rest/catalog/internal/etcd Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -354,6 +354,17 @@ public List<TableIdentifier> listTables(Namespace namespace) {
354354 .toList ();
355355 }
356356
357+ /**
358+ * {@link org.apache.iceberg.catalog.Catalog#tableExists(TableIdentifier)} override that doesn't
359+ * throw when table metadata files are missing/corrupted, allowing {@link
360+ * #dropTable(TableIdentifier, boolean)} to succeed.
361+ */
362+ @ Override
363+ public boolean tableExists (TableIdentifier identifier ) {
364+ ByteSequence key = byteSeq (tableKey (identifier ));
365+ return unwrap (kv .get (key , GetOption .builder ().withCountOnly (true ).build ())).getCount () > 0 ;
366+ }
367+
357368 private String tableKey (Namespace namespace ) {
358369 return tablePrefix () + namespaceToPath (namespace );
359370 }
You can’t perform that action at this time.
0 commit comments