Yshuro commented on PR #4427:
URL: https://github.com/apache/iceberg-python/pull/4427#issuecomment-7102550891
@Fokko Address review feedback:
1. Updated the error message in `pyiceberg/expressions/__init__.py` to:
```python
raise TypeError(
f"Cannot evaluate truthiness of non-constant BooleanExpression: {self}. "
"Use bitwise operators (~, &, |) instead of `and`, `or`, `not` for
combining expressions."
)
```
Also updated the unit tests in `tests/expressions/test_expressions.py` to
assert this pattern.
2. Added explanatory comments in `pyiceberg/catalog/rest/__init__.py` and
`tests/io/test_pyarrow.py` clarifying that `BooleanExpression` disallows
truthiness checks and that the explicit `None` check avoids `or AlwaysTrue()`.
3. Checked the repository release workflow (`mkdocs/docs/how-to-release.md`
and `mkdocs/docs/SUMMARY.md`). Release notes are generated directly on GitHub
Releases from tags/PRs rather than maintained in a static repository file. We
can attach the `changelog` label to this PR so this change is highlighted when
drafting release notes on GitHub for the next release.
--
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]