Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions etl-destinations/src/iceberg/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ pub struct IcebergClient {
}

impl IcebergClient {
/// Creates a new [`IcebergClient`] with the specified catalog.
pub fn new(catalog: Arc<dyn Catalog>) -> Self {
IcebergClient { catalog }
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.

/// Creates a new [`IcebergClient`] using a REST catalog configuration.
///
/// This constructor initializes a client that connects to an Iceberg catalog
Expand All @@ -71,9 +76,7 @@ impl IcebergClient {
let builder = RestCatalogBuilder::default();
let catalog = builder.load("RestCatalog", props).await?;

Ok(IcebergClient {
catalog: Arc::new(catalog),
})
Ok(IcebergClient::new(Arc::new(catalog)))
}

/// Creates a new [`IcebergClient`] configured for Supabase storage integration.
Expand Down Expand Up @@ -116,9 +119,7 @@ impl IcebergClient {
let client = SupabaseClient::new(catalog_uri, warehouse_name, catalog_token);
let catalog = SupabaseCatalog::new(inner, client);

Ok(IcebergClient {
catalog: Arc::new(catalog),
})
Ok(IcebergClient::new(Arc::new(catalog)))
}

/// Creates a namespace if it does not already exist.
Expand Down
Loading