tub opened a new pull request, #7456:
URL: https://github.com/apache/paimon/pull/7456

   ## Summary
   
   - Adds `paimon table stream <db.table>` CLI subcommand that continuously 
polls a Paimon table and prints new rows as they arrive until Ctrl+C
   - Adds `StreamReadBuilder.with_scan_from()` to the library so programmatic 
users can also control starting position (`"latest"`, `"earliest"`, or a 
snapshot ID integer)
   - Timestamp support in `--from` is resolved to a snapshot ID at the CLI 
layer (no timestamps in the library API)
     - I can push this down into the library if we think it'll be useful
   
   ## Flags
   
   | Flag | Default | Description |
   |---|---|---|
   | `--from` | `latest` | Starting position: `latest`, `earliest`, snapshot 
ID, or timestamp (`YYYY-MM-DD`, ISO 8601) |
   | `--select` | — | Column projection (comma-separated) |
   | `--where` | — | SQL-subset filter predicate |
   | `--format` | `table` | Output format: `table` or `json` |
   | `--poll-interval-ms` | `1000` | Milliseconds between snapshot polls |
   | `--include-row-kind` | off | Prepend `_row_kind` column (`+I`, `-U`, `+U`, 
`-D`) |
   | `--consumer-id` | — | Persist scan progress for at-least-once resume |
   
   ## Changes
   
   - `paimon-python/pypaimon/cli/cli_table_stream.py` — new command handler + 
`parse_from_position()` timestamp resolver
   - `paimon-python/pypaimon/cli/cli_table.py` — register `stream` subparser
   - `paimon-python/pypaimon/read/stream_read_builder.py` — `with_scan_from()`
   - `paimon-python/pypaimon/read/streaming_table_scan.py` — `scan_from` 
startup resolution (consumer restore always wins)
   
   ## Test plan
   
   - [x] `pypaimon/tests/stream_read_builder_test.py` — 7 new unit tests for 
`with_scan_from()`
   - [x] `pypaimon/tests/streaming_table_scan_test.py` — 4 new integration 
tests (`earliest`, numeric ID, `latest`, consumer-overrides-scan_from)
   - [x] `pypaimon/tests/cli_table_stream_test.py` — 20 new tests (CLI 
integration + `parse_from_position` unit tests)
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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]

Reply via email to