xabriel commented on a change in pull request #123: Add support for struct 
field based filtering
URL: https://github.com/apache/incubator-iceberg/pull/123#discussion_r264349713
 
 

 ##########
 File path: 
api/src/main/java/com/netflix/iceberg/expressions/BoundReference.java
 ##########
 @@ -32,19 +32,41 @@
 
   BoundReference(Types.StructType struct, int fieldId) {
     this.fieldId = fieldId;
-    this.pos = find(fieldId, struct);
-    this.type = struct.fields().get(pos).type();
+    this.pos = findTopFieldPos(fieldId, struct);
 
 Review comment:
   What does it mean to have a `pos = -1`?
   
   I ask because although this field is `private`, we do expose it via `pos()` 
and `toString()` methods, so we may need to populate this field with the actual 
position of the matched inner struct.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to