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


##########
python/pyiceberg/expressions/literals.py:
##########
@@ -108,7 +110,7 @@ def __ge__(self, other):
 
 
 @singledispatch
-def literal(value) -> Literal:
+def literal(value: Any) -> Literal[T]:

Review Comment:
   I think what worries me here is that I don't understand what `T` is in this 
case. Is this the equivalent in Java?
   
   ```java
     <T> Literal<T> of(Object value) {
       return new Literal<>(value);
     }
   ```
   
   That basically lets you return the parameterized type even though it may not 
match because the type comes from the call context.



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