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