rdblue commented on a change in pull request #1963:
URL: https://github.com/apache/iceberg/pull/1963#discussion_r569620243



##########
File path: 
core/src/main/java/org/apache/iceberg/avro/AvroWithPartnerByStructureVisitor.java
##########
@@ -161,4 +186,17 @@ public T map(P sMap, Schema map, T value) {
   public T primitive(P type, Schema primitive) {
     return null;
   }
+
+  // ---------------------------------- Helpers 
---------------------------------------------
+
+  private Deque<String> fieldNames = Lists.newLinkedList();
+  private Deque<Schema> parentSchemas = Lists.newLinkedList();

Review comment:
       Instead of updating all visitors, why not add extra callbacks like the 
visitors for Iceberg schemas? I think that supporting `beforeField` and 
`afterField` would be a better way to handle this than passing the parent and 
name around. The implementation to get a field's ID from its parent and name 
seems a bit awkward compared to adding an ID stack in one visitor.




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

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