liurenjie1024 commented on code in PR #1580:
URL: https://github.com/apache/iceberg-rust/pull/1580#discussion_r2262462300
##########
crates/catalog/rest/src/catalog.rs:
##########
@@ -45,13 +46,113 @@ use crate::types::{
RegisterTableRequest, RenameTableRequest,
};
+const REST_CATALOG_PROP_URI: &str = "uri";
+const REST_CATALOG_PROP_WAREHOUSE: &str = "warehouse";
const ICEBERG_REST_SPEC_VERSION: &str = "0.14.1";
const CARGO_PKG_VERSION: &str = env!("CARGO_PKG_VERSION");
const PATH_V1: &str = "v1";
+/// Builder for [`RestCatalog`].
+/// To build a rest catalog with configurations
+///
+/// # Example
+///
+/// ```rust, no_run
+/// use std::collections::HashMap;
+///
+/// use iceberg::CatalogBuilder;
+/// use iceberg_catalog_rest::RestCatalogBuilder;
+///
+/// #[tokio::main]
+/// async fn main() {
+/// let catalog = RestCatalogBuilder::default()
+/// .load(
+/// "rest",
+/// HashMap::from([
+/// ("uri".to_string(), "http://localhost:8181".to_string()),
Review Comment:
We should use constants rather than raw string as better practice. Please
change all occurences.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]