flyrain commented on code in PR #16131:
URL: https://github.com/apache/iceberg/pull/16131#discussion_r3790155629


##########
core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java:
##########
@@ -557,13 +558,22 @@ public Table loadTable(SessionContext context, 
TableIdentifier identifier) {
     }
 
     List<Credential> credentials = response.credentials();
+    ReadRestrictions readRestrictions = response.readRestrictions();
     RESTClient tableClient = client.withAuthSession(tableSession);
     Supplier<BaseTable> tableSupplier =
         createTableSupplier(
-            finalIdentifier, tableMetadata, context, tableClient, tableConf, 
credentials);
+            finalIdentifier,
+            tableMetadata,
+            context,
+            tableClient,
+            tableConf,
+            credentials,
+            readRestrictions);
 
     String eTag = responseHeaders.getOrDefault(HttpHeaders.ETAG, null);
-    if (eTag != null) {
+    if (eTag != null && readRestrictions.isEmpty()) {

Review Comment:
   yeah, we may need to harden the eTag contract a bit to avoid missing the 
catalog-level properties within the loadTableResponse. eTag now only is asked 
for "represent the same version of table metadata", 
(https://github.com/apache/iceberg/blob/50100e46242864113579639f61eecf85545b185f/open-api/rest-catalog-open-api.yaml#L2189).
 
   
   With more catalog level information being added into loadTableResponse, it 
makes more sense to let it represent a catalog-level + table-level contract in 
`loadTableResponse`. I also think this deserve a wider discussion. 



-- 
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]

Reply via email to