jx2lee opened a new pull request, #3718:
URL: https://github.com/apache/iceberg-python/pull/3718
# Rationale for this change
PyIceberg already exposes `Catalog.purge_table`, but the CLI only supports
dropping a table through `catalog.drop_table`.
This adds a `--purge` option to `pyiceberg drop table` so users can request
the existing catalog purge behavior from the CLI. The default behavior remains
unchanged: without `--purge`, the command still calls `catalog.drop_table`.
## Are these changes tested?
Yes.
- `make test PYTEST_ARGS="tests/cli/test_console.py -v -k 'drop_table'"`
- `uv run prek run ruff --files pyiceberg/cli/console.py
tests/cli/test_console.py`
- `uv run prek run ruff-format --files pyiceberg/cli/console.py tests/cli/
test_console.py`
## Are there any user-facing changes?
Yes. `pyiceberg drop table <identifier> --purge` is now available and calls
`catalog.purge_table(identifier)`.
--
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]