-
Notifications
You must be signed in to change notification settings - Fork 299
feat(catalog): implement catalog loader for glue #1603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -46,6 +47,7 @@ impl<T: CatalogBuilder + 'static> BoxedCatalogBuilder for T { | |||
pub fn load(r#type: &str) -> Result<Box<dyn BoxedCatalogBuilder>> { | |||
match r#type { | |||
"rest" => Ok(Box::new(RestCatalogBuilder::default()) as Box<dyn BoxedCatalogBuilder>), | |||
"glue" => Ok(Box::new(GlueCatalogBuilder::default()) as Box<dyn BoxedCatalogBuilder>), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shoud we make these enum or static strings stored under the iceberg/src/catalog/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I think having a enum storing the strings make sense. We could try raising it in this PR or create a separate minor PR for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @lliangyu-lin for this pr, generally LGTM!
crates/catalog/glue/src/catalog.rs
Outdated
} | ||
} | ||
} | ||
|
||
#[derive(Debug, TypedBuilder)] | ||
/// Glue Catalog configuration | ||
pub struct GlueCatalogConfig { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this crate private.
crates/catalog/glue/src/catalog.rs
Outdated
} | ||
} | ||
} | ||
|
||
#[derive(Debug, TypedBuilder)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remve the builder?
//! .load( | ||
//! "glue", | ||
//! HashMap::from([( | ||
//! GLUE_CATALOG_PROP_WAREHOUSE.to_string(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we need uri, name, catalog id?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, they are actually optional except for catalog name, which is set as glue
in .load("glue", xxx)
# Conflicts: # crates/catalog/glue/tests/glue_catalog_test.rs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @lliangyu-lin for this pr, LGTM!
## Which issue does this PR close? - Closes [apache#1259](apache#1259). ## What changes are included in this PR? * Added `GlueCatalogBuilder` * Implement `CatalogBuilder` trait for `GlueCatalogBuilder` * Include glue in loader ## Are these changes tested? Added in loader tests and updated glue integration tests
Which issue does this PR close?
What changes are included in this PR?
GlueCatalogBuilder
CatalogBuilder
trait forGlueCatalogBuilder
Are these changes tested?
Added in loader tests and updated glue integration tests