Skip to content

Commit 13744e2

Browse files
author
Jan Kaul
committed
fix table_exists method?
1 parent 8231641 commit 13744e2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

datafusion_iceberg/src/catalog/mirror.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,9 @@ impl Mirror {
181181
.map_err(DataFusionError::from)
182182
}
183183
pub fn table_exists(&self, identifier: Identifier) -> bool {
184-
self.storage.contains_key(&identifier.to_string())
184+
self.storage.get(&identifier.to_string()).map_or(false, |node| {
185+
matches!(node.value(), Node::Relation(_))
186+
})
185187
}
186188

187189
pub fn schema_exists(&self, name: &str) -> bool {

0 commit comments

Comments
 (0)