rdblue commented on code in PR #5303:
URL: https://github.com/apache/iceberg/pull/5303#discussion_r964123604
##########
python/pyiceberg/expressions/base.py:
##########
@@ -672,3 +683,42 @@ def visit_unbound_predicate(self, predicate) ->
BooleanExpression:
def visit_bound_predicate(self, predicate) -> BooleanExpression:
raise TypeError(f"Found already bound predicate: {predicate}")
+
+
+class BoundBooleanExpressionVisitor(BooleanExpressionVisitor[T], ABC):
+ @abstractmethod
+ def visit_in(self, ref: BoundReference[T], literals: set[Literal[Any]]) ->
T:
+ """Visit the ref and literals from an In boolean expression
+ Args:
+ ref (BoundReference[T]): The ref used in the In boolean expression
+ literals (Tuple[Literal[T], ...]): The literals used in the In
boolean expression
+ Raises:
+ NotImplementedError: If the concrete bound boolean expression
visitor does not override this method
+ Returns:
+ R: The return type defined by the concrete bound boolean
expression visitor
+ """
Review Comment:
Do you want to add methods for the other expression types?
--
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]