advancedxy commented on code in PR #9662:
URL: https://github.com/apache/iceberg/pull/9662#discussion_r1505993495


##########
api/src/main/java/org/apache/iceberg/StructTransform.java:
##########
@@ -51,11 +53,16 @@ class StructTransform implements StructLike, Serializable {
     this.transforms = new SerializableFunction[size];
 
     for (int i = 0; i < size; ++i) {
-      int sourceFieldId = fieldTransforms.get(i).sourceFieldId();
+      int[] sourceFieldIds = fieldTransforms.get(i).sourceFieldIds();
       Transform<?, ?> transform = fieldTransforms.get(i).transform();
-      Accessor<StructLike> accessor = schema.accessorForField(sourceFieldId);
+      Accessor<StructLike> accessor = schema.accessorForFields(sourceFieldIds);
+      String sourceFieldsDesc =
+          Arrays.stream(sourceFieldIds)
+              .mapToObj(schema::findField)
+              .map(Types.NestedField::name)

Review Comment:
   `NestedField.toString` is a bit too verbose. 
   
   After a second thought, maybe we should just use that to be compatible with 
previous impl



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