Skip to content

Commit

Permalink
fix: remove unused code and added check if table exists in register_t…
Browse files Browse the repository at this point in the history
…able

Signed-off-by: Alexander Falk <[email protected]>
  • Loading branch information
Nordalf committed Feb 19, 2025
1 parent 3699cf7 commit 34ee8dd
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions crates/core/src/data_catalog/storage/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,17 +105,6 @@ impl ListingSchemaProvider {
let mut delta_table = delta_table.clone();
delta_table.load().await?;
*table = Arc::from(delta_table);
//match delta_table.load().await {
// Ok(()) => {
// // Add the table back to the DashMap
// }
// Err(err) => {
// return Err(DataFusionError::Internal(format!(
// "Cannot load delta table. See stacktrace: {}",
// err.to_string()
// )))
// }
//}
}
}
}
Expand Down Expand Up @@ -159,7 +148,9 @@ impl SchemaProvider for ListingSchemaProvider {
name: String,
table: Arc<dyn TableProvider>,
) -> datafusion_common::Result<Option<Arc<dyn TableProvider>>> {
self.tables.insert(name, table.clone());
if !self.table_exist(name.as_str()) {
self.tables.insert(name, table.clone());
}
Ok(Some(table))
}

Expand Down

0 comments on commit 34ee8dd

Please sign in to comment.