rdblue commented on code in PR #6139: URL: https://github.com/apache/iceberg/pull/6139#discussion_r1015867397
########## python/pyiceberg/expressions/__init__.py: ########## @@ -32,6 +41,24 @@ B = TypeVar("B") +def _to_literal(lit: Optional[Union[T, Literal[T]]]) -> Optional[Literal[T]]: + # This should not be optional, to be fixed in a separate PR + if lit: + return lit if isinstance(lit, Literal) else literal(lit) + else: + return None + + +def _combine_into_set(values: Tuple[Union[T, Literal[T], Iterable[T], Iterable[Literal[T]]], ...]) -> Set[Literal[T]]: Review Comment: Do we need values to be so complex? I would say that we can accept any `Iterable[T]` or `Iterable[Literal[T]]`. We don't need to support mixing literals with raw values, right? -- 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