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


##########
core/src/main/java/org/apache/iceberg/rest/ETagProvider.java:
##########
@@ -45,6 +45,10 @@ public static String of(String metadataLocation, Map<String, 
String> params) {
       stringToHash = COMMA.join(metadataLocation, 
PARAMS_JOINER.join(orderedParams));
     }
 
-    return MURMUR3.hashString(stringToHash, StandardCharsets.UTF_8).toString();
+    return quote(MURMUR3.hashString(stringToHash, 
StandardCharsets.UTF_8).toString());
+  }
+
+  private static String quote(String string) {
+    return String.format("\"%s\"", string);
   }

Review Comment:
   I wouldn't rename the parameter to `hash` because then we give semantic 
meaning to the param saying it's a hash and not something completely opaque to 
the function.
   Also the function name `quote` describe exactly what it does, it gets and 
opaque string and puts it between quotes. The suggestion I think is less 
verbose.



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