Skip to content

Commit 7568b0d

Browse files
committed
better comments
1 parent c8d41df commit 7568b0d

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

pyiceberg/expressions/visitors.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -896,16 +896,13 @@ def visit_bound_predicate(self, predicate: BoundPredicate[L]) -> BooleanExpressi
896896
field = predicate.term.ref().field
897897
file_column_name = self.file_schema.find_column_name(field.field_id)
898898

899+
# In the case of schema evolution or column projection, the field might not be present in the file schema
899900
if file_column_name is None:
900-
# In the case of column projection, the field might not be present in the file schema
901-
# If the field has no initial_default, return AlwaysTrue to include all rows
902-
# for further evaluation
901+
# If the field has no initial_default, return AlwaysTrue to include all rows for further evaluation
903902
if field.initial_default is None:
904903
return AlwaysTrue()
905904

906-
# In the case of schema evolution, the column might not be present
907-
# we can use the default value as a constant and evaluate it against
908-
# the predicate
905+
# If the field has initial_default, use the default value as a constant and evaluate it against the predicate
909906
pred: BooleanExpression
910907
if isinstance(predicate, BoundUnaryPredicate):
911908
pred = predicate.as_unbound(field.name)

0 commit comments

Comments
 (0)