rdblue commented on code in PR #9366:
URL: https://github.com/apache/iceberg/pull/9366#discussion_r1435370465


##########
core/src/main/java/org/apache/iceberg/avro/ValueReaders.java:
##########
@@ -739,17 +956,18 @@ protected void set(R struct, int pos, Object value) {
     }
   }
 
-  static class PositionReader implements ValueReader<Long> {
-    private long currentPosition;
-
-    PositionReader(long rowPosition) {
-      this.currentPosition = rowPosition - 1;
-    }
+  static class PositionReader implements ValueReader<Long>, 
SupportsRowPosition {

Review Comment:
   This refactor includes changes to make `PositionReader` easier to use. 
Rather than needing to instantiate it inside of `setRowPositionSupplier`, it 
now just implements `SupportsRowPosition`. The logic for creating a position 
reader is now part of the object model rather than part of `StructReader`.



-- 
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-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to