You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "sfc-gh-hozhang (via GitHub)" <gi...@apache.org> on 2025/08/01 20:59:29 UTC
Re: [PR] Core: Extended header support for RESTClient implementations [iceberg]
sfc-gh-hozhang commented on code in PR #12194:
URL: https://github.com/apache/iceberg/pull/12194#discussion_r2248859282
##########
core/src/test/java/org/apache/iceberg/rest/RESTCatalogAdapter.java:
##########
@@ -704,4 +714,12 @@ private static TableIdentifier viewIdentFromPathVars(Map<String, String> pathVar
return TableIdentifier.of(
namespaceFromPathVars(pathVars), RESTUtil.decodeString(pathVars.get("view")));
}
+
+ private static class ETag {
+ private static final HashFunction MURMUR3 = Hashing.murmur3_32_fixed();
+
+ public static String of(LoadTableResponse resp) {
+ return MURMUR3.hashString(resp.metadataLocation(), StandardCharsets.UTF_8).toString();
+ }
+ }
Review Comment:
nit: I think this can move to a ETagUtility class in src if we want to use it outside the test
##########
core/src/test/java/org/apache/iceberg/rest/RESTCatalogAdapter.java:
##########
@@ -704,4 +714,12 @@ private static TableIdentifier viewIdentFromPathVars(Map<String, String> pathVar
return TableIdentifier.of(
namespaceFromPathVars(pathVars), RESTUtil.decodeString(pathVars.get("view")));
}
+
+ private static class ETag {
+ private static final HashFunction MURMUR3 = Hashing.murmur3_32_fixed();
+
+ public static String of(LoadTableResponse resp) {
+ return MURMUR3.hashString(resp.metadataLocation(), StandardCharsets.UTF_8).toString();
+ }
Review Comment:
nit: do we need entire LoadTableResponse?
```java
public static String ofMetadataLocation(String metadataLocation) {
return MURMUR3.hashString(metadataLocation, StandardCharsets.UTF_8).toString();
}
```
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org