You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2019/03/11 18:33:04 UTC

[GitHub] [incubator-iceberg] xabriel commented on a change in pull request #123: Add support for struct field based filtering

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org