blackmwk commented on code in PR #3368:
URL: https://github.com/apache/iceberg-rust/pull/3368#discussion_r4311902003
##########
crates/catalog/rest/src/catalog.rs:
##########
@@ -1219,11 +1278,15 @@ impl SessionCatalog for RestSessionCatalog {
) -> Result<Table> {
let client = self.client().await?;
- let request = HttpRequest::build(
- client
- .http_client
- .request(Method::GET,
client.config.table_endpoint(table_ident)),
- )?;
+ let mut request_builder = client
+ .http_client
+ .request(Method::GET, client.config.table_endpoint(table_ident));
+
+ if let Some(mode) = client.config.snapshot_loading_mode()? {
+ request_builder = request_builder.query(&[("snapshots",
mode.as_str())]);
Review Comment:
> is the idea to add load_table_with_snapshots on
RestCatalog/RestSessionCatalog?
Yes.
> but it's not clear how this would work in the generic case like Datafusion
which will call load_table on an Arc<dyn Catalog>
They can do sth as following:
```
let c: Arc<dyn Catalog> = ...;
let rest_catalog = c.downcast::<RestCatalog>();
rest_catalog.load_table_with_snapshots(xxx)
```
--
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]