amogh-jahagirdar commented on code in PR #17438:
URL: https://github.com/apache/iceberg/pull/17438#discussion_r3708720636


##########
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 remember some discussion around using the newer Java language switch 
statement but I don't know where it landed, are we good with this style now?  
cc @nastra @RussellSpitzer @stevenzwu 



##########
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'm not opinionated on this one, I just want to make sure the style is 
consistent 



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