gaborkaszab commented on code in PR #12194:
URL: https://github.com/apache/iceberg/pull/12194#discussion_r2256990542


##########
core/src/test/java/org/apache/iceberg/rest/RESTCatalogAdapter.java:
##########
@@ -392,8 +398,9 @@ public <T extends RESTResponse> T handleRequest(
             return castResponse(
                 responseType, CatalogHandlers.stageTableCreate(catalog, 
namespace, request));
           } else {
-            return castResponse(
-                responseType, CatalogHandlers.createTable(catalog, namespace, 
request));
+            LoadTableResponse resp = CatalogHandlers.createTable(catalog, 
namespace, request);
+            responseHeaders.accept(ImmutableMap.of(HttpHeaders.ETAG, 
ETag.of(resp)));

Review Comment:
   I wonder if it makes sense to have an ETagProvider (or something similar) 
pluggable to RESTCatalogAdapter so instead of "hard-coding" the ETag 
calculation as I do now. It would give a bit more flexibility and also would 
help testability to have a pluggable provider, but I'm not sure if it's 
over-engineering.



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