Skip to content

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

Merged
merged 9 commits into from
Aug 19, 2025

Conversation

lliangyu-lin
Copy link
Contributor

@lliangyu-lin lliangyu-lin commented Aug 13, 2025

Which issue does this PR close?

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

@lliangyu-lin lliangyu-lin marked this pull request as ready for review August 13, 2025 18:57
@@ -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>),
Copy link
Contributor

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/

Copy link
Contributor Author

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.

Copy link
Contributor

@liurenjie1024 liurenjie1024 left a 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!

}
}
}

#[derive(Debug, TypedBuilder)]
/// Glue Catalog configuration
pub struct GlueCatalogConfig {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this crate private.

}
}
}

#[derive(Debug, TypedBuilder)]
Copy link
Contributor

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(),
Copy link
Contributor

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?

Copy link
Contributor Author

@lliangyu-lin lliangyu-lin Aug 14, 2025

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)

Copy link
Contributor

@liurenjie1024 liurenjie1024 left a 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!

@liurenjie1024 liurenjie1024 merged commit c3c60d0 into apache:main Aug 19, 2025
18 checks passed
@lliangyu-lin lliangyu-lin deleted the glue-catalog-loader branch August 20, 2025 23:40
lliangyu-lin added a commit to lliangyu-lin/iceberg-rust that referenced this pull request Aug 21, 2025
## 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement catalog loader for glue catalog.
3 participants