Fokko commented on code in PR #2029:
URL: https://github.com/apache/iceberg-python/pull/2029#discussion_r2164195332


##########
pyiceberg/expressions/visitors.py:
##########
@@ -894,12 +895,17 @@ def visit_unbound_predicate(self, predicate: 
UnboundPredicate[L]) -> BooleanExpr
 
     def visit_bound_predicate(self, predicate: BoundPredicate[L]) -> 
BooleanExpression:
         file_column_name = 
self.file_schema.find_column_name(predicate.term.ref().field.field_id)
+        field_name = predicate.term.ref().field.name
 
         if file_column_name is None:
             # In the case of schema evolution, the column might not be present
             # in the file schema when reading older data
             if isinstance(predicate, BoundIsNull):
                 return AlwaysTrue()
+            # Projected fields are only available for identity partition fields
+            # Which mean that partition pruning excluded partition field which 
evaluates to false
+            elif field_name in self.projected_missing_fields:
+                return AlwaysTrue()

Review Comment:
   @Erigara Sorry, this fell of my radar. Thanks for pinging me, and let me 
take another look.



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