liurenjie1024 commented on code in PR #89: URL: https://github.com/apache/iceberg-rust/pull/89#discussion_r1378522771
########## crates/catalog/rest/src/catalog.rs: ########## @@ -312,11 +316,43 @@ impl Catalog for RestCatalog { } /// Load table from the catalog. - async fn load_table(&self, _table: &TableIdent) -> Result<Table> { - Err(Error::new( - ErrorKind::FeatureUnsupported, - "Creating table not supported yet!", - )) + async fn load_table(&self, table: &TableIdent) -> Result<Table> { + let request = self + .client + .0 + .get(self.config.table_endpoint(table)) + .build()?; + + let resp = self + .client + .query::<LoadTableResponse, ErrorResponse, OK>(request) + .await?; + + let mut props = self.config.props.clone(); + if let Some(config) = resp.config { + props.extend(config); + } + + let file_io = match self + .config + .warehouse Review Comment: This code here first try with `warehouse`, if not set, then try with `metadata_location` from response. If neither is set, we now throw an error. -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org