rdblue commented on code in PR #5427:
URL: https://github.com/apache/iceberg/pull/5427#discussion_r942813309
##########
api/src/main/java/org/apache/iceberg/metrics/MetricsContext.java:
##########
@@ -42,6 +42,20 @@ enum Unit {
public String displayName() {
return displayName;
}
+
+ public static Unit fromDisplayName(String displayName) {
Review Comment:
We would normally reuse `valueOf` to make this simpler and not require
updating if more symbols are added:
```java
return Unit.valueOf(dispayName.toUpperCase(Locale.ROOT));
```
--
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]