szehon-ho commented on code in PR #9662:
URL: https://github.com/apache/iceberg/pull/9662#discussion_r1506370636


##########
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);

Review Comment:
   One possible way is to add a .bind(Type... types) to the Transform API, to 
be implemented by multi-arg transforms?
   
   I feel it is more clearer and less heavy-handed than using StructProjection 
for each row, but definitely would also like to check with @aokolnychyi and 
@rdblue.  If its not possible, then something like you are doing makes sense.



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