Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chenzl25 committed Jan 2, 2025
1 parent ba6302f commit 47bd6ab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/connector/src/connector_common/iceberg/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")
})?)
Expand Down Expand Up @@ -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")
})?)
Expand Down
6 changes: 3 additions & 3 deletions src/connector/src/connector_common/iceberg/storage_catalog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use typed_builder::TypedBuilder;
#[derive(Debug)]
pub enum StorageCatalogConfig {
S3(StorageCatalogS3Config),
GCS(StorageCatalogGCSConfig),
Gcs(StorageCatalogGcsConfig),
}

#[derive(Clone, Debug, TypedBuilder)]
Expand All @@ -45,7 +45,7 @@ pub struct StorageCatalogS3Config {
}

#[derive(Clone, Debug, TypedBuilder)]
pub struct StorageCatalogGCSConfig {
pub struct StorageCatalogGcsConfig {
warehouse: String,
credential: String,
}
Expand Down Expand Up @@ -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()?)
Expand Down

0 comments on commit 47bd6ab

Please sign in to comment.