icelake-io/icelake

StorageCatalog's test functions are leaked

Closed this issue · 4 comments

Xuanwo commented

pub async fn load_table_in(warehouse_path: &str, table_name: &str) -> Result<Table> {
let configs = HashMap::from([
(CATALOG_NAME.to_string(), "demo".to_string()),
(CATALOG_TYPE.to_string(), "storage".to_string()),
(
format!("{CATALOG_CONFIG_PREFIX}demo.warehouse"),
warehouse_path.to_string(),
),
]);
let fs_catalog = load_catalog(&configs).await?;
fs_catalog
.load_table(&TableIdentifier::new(vec![table_name])?)
.await
}

Those API should not be exposed to users.

Xuanwo commented

cc @liurenjie1024 @ZENOTME to take a look

These apis are used for simplifying migration from original Table load api. It's ok for me to deprecate or narrow down their visibility.

Xuanwo commented

Let's clean up them.

Xuanwo commented

narrow down to pub(crate)