samredai commented on code in PR #4816:
URL: https://github.com/apache/iceberg/pull/4816#discussion_r883172502
##########
python/src/iceberg/expressions/base.py:
##########
@@ -137,6 +74,28 @@ def __invert__(self) -> "BooleanExpression":
...
+class BoundPredicate(ABC):
+ def __init__(self, left, right):
+ """A concrete predicate must have a `left` and `right`"""
+ self._left = left
+ self._right = right
Review Comment:
Does `ref` and `literal` sound better? That's what it originally was in this
PR. The visit function would then look like:
```py
@visit.register(UnboundPredicate)
def _(obj: UnboundPredicate, visitor: BooleanExpressionVisitor[T]) -> T:
"""Visit an unbound predicate with a concrete BooleanExpressionVisitor"""
ref_result: T = visit(obj.ref, visitor=visitor)
literal_result: T = visit(obj.literal, visitor=visitor)
return visitor.visit_unbound_predicate(ref_result=ref_result,
literal_result=literal_result)
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]