TheR1sing3un opened a new pull request, #7896: URL: https://github.com/apache/paimon/pull/7896
## What Add `paimon table explain <db.tbl>` CLI subcommand exposing `ReadBuilder.explain()` (#7869). Supports `--where`, `--select`, `--limit`, `--verbose`, `--format table|json`, mirroring `paimon table read`. Follow-up of #7869 — also removes the CLI TODO left next to `ReadBuilder.explain`. ## Sample output `paimon -c paimon.yaml table explain default.events --where "dt='2026-05-16' AND id=7" --select dt,id,val`: ``` == PyPaimon Scan Plan == Table: default.events (PK, HASH_FIXED) Snapshot: 5 (schema 0) Predicate: (dt = '2026-05-16') AND (id = 7) Projection: [dt, id, val] Partition pruning: 20 -> 4 (pruned 16) Bucket pruning: 4 -> 1 (pruned 3) File skipping: 1 -> 1 (pruned 0) ... ``` `--format json` is also available for scripting (with `level_histogram` keys as JSON strings). ## Tests `pypaimon/tests/cli_table_test.py` adds 7 cases: baseline, `--select`+`--limit`, `--verbose`, partition pruning via `--where`, JSON format, invalid table, invalid WHERE. Full pypaimon CLI + explain suite is clean locally. ## Docs - `docs/content/pypaimon/cli.md` — new `### Table Explain` section - `docs/content/pypaimon/python-api.md` — CLI block under existing "Explain Scan Plan" subsection ## Generative AI usage Drafted with the help of Claude Code; reviewed and tested locally by the author. -- 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]
