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


##########
python/tests/expressions/test_visitors.py:
##########
@@ -284,13 +277,14 @@ def 
test_boolean_expression_visit_raise_not_implemented_error():
 
 
 def test_bind_visitor_already_bound(table_schema_simple: Schema):
-    bound = BoundEqualTo(
-        BoundReference(table_schema_simple.find_field(1), 
table_schema_simple.accessor_for_field(1)), literal("hello")
+    bound = BoundEqualTo[Literal[str]](

Review Comment:
   I think this type is or should be wrong. The type of an expression or 
predicate is the type of the values that it matches against. Literal is a way 
of storing and working with those values, but it should never be a predicate's 
type parameter.
   
   For example, if an expression is `a < 5` then the predicate's type parameter 
is `int`, not `Literal[int]`. And if `a` turns out to be a float when the 
expression is bound, the bound predicate's type would be `float` and not 
`Literal[float]`. The literal is how we hold `5` and convert it from `int` to 
`float`.



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