nastra commented on code in PR #17438:
URL: https://github.com/apache/iceberg/pull/17438#discussion_r3709867894


##########
core/src/main/java/org/apache/iceberg/DeletionVectorStruct.java:
##########
@@ -90,38 +106,28 @@ protected <T> T internalGet(int pos, Class<T> javaClass) {
   }
 
   private Object getByPos(int pos) {
-    switch (pos) {
-      case 0:
-        return location;
-      case 1:
-        return offset;
-      case 2:
-        return sizeInBytes;
-      case 3:
-        return cardinality;
-      default:
-        throw new UnsupportedOperationException("Unknown field ordinal: " + 
pos);
-    }
+    return switch (pos) {

Review Comment:
   I believe we said it's fine to introduce such smaller changes in PRs but we 
didn't want to do one large refactor of the codebase



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