[python] Add streaming reads to paimon CLI (table stream command)#7456
Draft
tub wants to merge 3 commits intoapache:masterfrom
Draft
[python] Add streaming reads to paimon CLI (table stream command)#7456tub wants to merge 3 commits intoapache:masterfrom
table stream command)#7456tub wants to merge 3 commits intoapache:masterfrom
Conversation
…reamReadBuilder - Add `paimon table stream <db.table>` CLI subcommand that continuously polls a table and prints new rows as they arrive until Ctrl+C - Flags: --select, --where, --format (table|json), --from, --poll-interval-ms, --include-row-kind, --consumer-id - --from accepts 'latest' (default), 'earliest', a numeric snapshot ID, or a timestamp string (YYYY-MM-DD, ISO 8601 with/without timezone) - Add StreamReadBuilder.with_scan_from() accepting 'latest', 'earliest', or an integer snapshot ID; passed through to AsyncStreamingTableScan with consumer restore taking highest priority over scan_from - Tests: 7 new unit tests in stream_read_builder_test.py, 4 integration tests in streaming_table_scan_test.py, 20 tests in cli_table_stream_test.py Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…check in table stream CLI Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…pport named timezones Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
paimon table stream <db.table>CLI subcommand that continuously polls a Paimon table and prints new rows as they arrive until Ctrl+CStreamReadBuilder.with_scan_from()to the library so programmatic users can also control starting position ("latest","earliest", or a snapshot ID integer)--fromis resolved to a snapshot ID at the CLI layer (no timestamps in the library API)Flags
--fromlatestlatest,earliest, snapshot ID, or timestamp (YYYY-MM-DD, ISO 8601)--select--where--formattabletableorjson--poll-interval-ms1000--include-row-kind_row_kindcolumn (+I,-U,+U,-D)--consumer-idChanges
paimon-python/pypaimon/cli/cli_table_stream.py— new command handler +parse_from_position()timestamp resolverpaimon-python/pypaimon/cli/cli_table.py— registerstreamsubparserpaimon-python/pypaimon/read/stream_read_builder.py—with_scan_from()paimon-python/pypaimon/read/streaming_table_scan.py—scan_fromstartup resolution (consumer restore always wins)Test plan
pypaimon/tests/stream_read_builder_test.py— 7 new unit tests forwith_scan_from()pypaimon/tests/streaming_table_scan_test.py— 4 new integration tests (earliest, numeric ID,latest, consumer-overrides-scan_from)pypaimon/tests/cli_table_stream_test.py— 20 new tests (CLI integration +parse_from_positionunit tests)🤖 Generated with Claude Code