Fokko commented on PR #2561:
URL: https://github.com/apache/iceberg-python/pull/2561#issuecomment-3380062826
> Should we address this in this PR or delegate it to another issue?
That's a bit of an edge case, since you deliberately ignore the type
annotation. We could add a check in the function itself:
```python
def _to_unbound_term(term: Union[str, UnboundTerm[Any]]) -> UnboundTerm[Any]:
if isinstance(term, str),
return Reference(term)
elif isinstance(term, UnboundTerm):
return term
else:
raise ValueError(f"Expected UnboundTerm or str, but got: {term}")
return Reference(term) if isinstance(term, str) else term
```
--
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]