|
14 | 14 | use crate::circuit_breaker::{CircuitBreaker, CircuitBreakerConfig}; |
15 | 15 | use crate::config::{CatalogType, IcebergConfig}; |
16 | 16 | use crate::iceberg::factory::{ |
17 | | - CatalogFactory, CatalogHealth, CatalogOperations, DataFileInfo, SchemaFieldInfo, |
18 | | - SnapshotCommit, SnapshotCommitResult, TableInfo, TableSchema, |
| 17 | + CatalogFactory, CatalogHealth, CatalogOperations, SchemaFieldInfo, SnapshotCommit, |
| 18 | + SnapshotCommitResult, TableInfo, TableSchema, |
19 | 19 | }; |
20 | 20 | use crate::{Error, IcebergError, Result}; |
21 | 21 | use async_trait::async_trait; |
@@ -201,8 +201,7 @@ impl GlueCatalogClient { |
201 | 201 | .and_then(|s| s.parse::<i64>().ok()); |
202 | 202 |
|
203 | 203 | // Extract table properties |
204 | | - let properties: HashMap<String, String> = |
205 | | - table.parameters().map(|p| p.clone()).unwrap_or_default(); |
| 204 | + let properties: HashMap<String, String> = table.parameters().cloned().unwrap_or_default(); |
206 | 205 |
|
207 | 206 | Ok(TableInfo { |
208 | 207 | namespace: namespace.to_string(), |
@@ -261,9 +260,7 @@ impl GlueCatalogClient { |
261 | 260 | // Handle complex types or unknown types |
262 | 261 | if glue_type.starts_with("array<") { |
263 | 262 | format!("list<{}>", &glue_type[6..glue_type.len() - 1]) |
264 | | - } else if glue_type.starts_with("map<") { |
265 | | - glue_type.to_string() |
266 | | - } else if glue_type.starts_with("struct<") { |
| 263 | + } else if glue_type.starts_with("map<") || glue_type.starts_with("struct<") { |
267 | 264 | glue_type.to_string() |
268 | 265 | } else { |
269 | 266 | "string".to_string() // Default fallback |
@@ -445,7 +442,7 @@ impl CatalogOperations for GlueCatalogClient { |
445 | 442 |
|
446 | 443 | let database_input = aws_sdk_glue::types::DatabaseInput::builder() |
447 | 444 | .name(namespace) |
448 | | - .description(format!("Iceberg database created by k2i")) |
| 445 | + .description("Iceberg database created by k2i".to_string()) |
449 | 446 | .location_uri(format!("{}/{}", self.config.warehouse_path, namespace)) |
450 | 447 | .build() |
451 | 448 | .map_err(|e| Error::Config(format!("Failed to build database input: {}", e)))?; |
|
0 commit comments