From 47bd6ab66c72090ae0772986e9cb29e644ad7222 Mon Sep 17 00:00:00 2001 From: Dylan Chen Date: Thu, 2 Jan 2025 21:20:16 +0800 Subject: [PATCH] fix --- src/connector/src/connector_common/iceberg/mod.rs | 8 ++++---- .../src/connector_common/iceberg/storage_catalog.rs | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/connector/src/connector_common/iceberg/mod.rs b/src/connector/src/connector_common/iceberg/mod.rs index a65e6f7d1241b..42bddfd169de0 100644 --- a/src/connector/src/connector_common/iceberg/mod.rs +++ b/src/connector/src/connector_common/iceberg/mod.rs @@ -303,8 +303,8 @@ impl IcebergCommon { "storage" => { // check gcs credential or s3 access key and secret key let config = if let Some(gcs_credential) = &self.gcs_credential { - StorageCatalogConfig::GCS( - storage_catalog::StorageCatalogGCSConfig::builder() + StorageCatalogConfig::Gcs( + storage_catalog::StorageCatalogGcsConfig::builder() .warehouse(self.warehouse_path.clone().ok_or_else(|| { anyhow!("`warehouse.path` must be set in storage catalog") })?) @@ -494,8 +494,8 @@ impl IcebergCommon { .build(), ) } else { - StorageCatalogConfig::GCS( - storage_catalog::StorageCatalogGCSConfig::builder() + StorageCatalogConfig::Gcs( + storage_catalog::StorageCatalogGcsConfig::builder() .warehouse(self.warehouse_path.clone().ok_or_else(|| { anyhow!("`warehouse.path` must be set in storage catalog") })?) diff --git a/src/connector/src/connector_common/iceberg/storage_catalog.rs b/src/connector/src/connector_common/iceberg/storage_catalog.rs index f2f5b8abbcf71..da7a337c67686 100644 --- a/src/connector/src/connector_common/iceberg/storage_catalog.rs +++ b/src/connector/src/connector_common/iceberg/storage_catalog.rs @@ -32,7 +32,7 @@ use typed_builder::TypedBuilder; #[derive(Debug)] pub enum StorageCatalogConfig { S3(StorageCatalogS3Config), - GCS(StorageCatalogGCSConfig), + Gcs(StorageCatalogGcsConfig), } #[derive(Clone, Debug, TypedBuilder)] @@ -45,7 +45,7 @@ pub struct StorageCatalogS3Config { } #[derive(Clone, Debug, TypedBuilder)] -pub struct StorageCatalogGCSConfig { +pub struct StorageCatalogGcsConfig { warehouse: String, credential: String, } @@ -76,7 +76,7 @@ impl StorageCatalog { }; (config.warehouse.clone(), file_io_builder.build()?) } - StorageCatalogConfig::GCS(config) => { + StorageCatalogConfig::Gcs(config) => { let file_io_builder = FileIO::from_path(&config.warehouse)? .with_prop(GCS_CREDENTIALS_JSON, &config.credential); (config.warehouse.clone(), file_io_builder.build()?)