the-other-tim-brown commented on code in PR #766:
URL: https://github.com/apache/incubator-xtable/pull/766#discussion_r2607034772


##########
xtable-core/src/main/java/org/apache/xtable/iceberg/IcebergSchemaExtractor.java:
##########
@@ -146,10 +146,14 @@ private List<Types.NestedField> convertFields(
     List<Integer> ids =
         schema.getFields().stream()
             .map(
-                field ->
-                    field.getFieldId() == null
-                        ? fieldIdTracker.incrementAndGet()
-                        : field.getFieldId())
+                field -> {
+                  int id =
+                      field.getFieldId() == null

Review Comment:
   If the fieldId is set, we need to use that ID. That is how we are able to 
handle renames in the schema. The reader will lookup the column based on the 
ID. 



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

Reply via email to