Fokko commented on code in PR #6139:
URL: https://github.com/apache/iceberg/pull/6139#discussion_r1023297504


##########
python/pyiceberg/expressions/__init__.py:
##########
@@ -48,12 +65,13 @@ class Bound(ABC):
     """Represents a bound value expression"""
 
 
-class Unbound(Generic[B], ABC):
+class Unbound(ABC):
     """Represents an unbound value expression"""
 
+    @property
     @abstractmethod
-    def bind(self, schema: Schema, case_sensitive: bool = True) -> B:
-        ...  # pragma: no cover
+    def as_bound(self) -> Type[Bound]:
+        ...
 
 
 class BoundTerm(Term[T], Bound, ABC):

Review Comment:
   > Rather than remove the type from the parent of Reference, BoundTerm[T], 
can we separate the term's type from the literal's type? I think the problem is 
that the type checker expects that to match and it won't necessarily (we 
probably want it to be BoundTerm[Any]). But we could just define the unbound 
types as In(Generic[R, L]) where R is a reference type (that becomes Any) and L 
is a literal type.
   
   Why add a type at all? It will add complexity to the codebase and it will 
always be `Any` or `<nothing>`.



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

Reply via email to