Skip to content

[python] Add IncrementalDiff acceptance tests and streaming API docs#7436

Merged
JingsongLi merged 4 commits intoapache:masterfrom
tub:python-streaming-2e-acceptance-docs
Mar 17, 2026
Merged

[python] Add IncrementalDiff acceptance tests and streaming API docs#7436
JingsongLi merged 4 commits intoapache:masterfrom
tub:python-streaming-2e-acceptance-docs

Conversation

@tub
Copy link
Contributor

@tub tub commented Mar 16, 2026

What does this PR do?

Final PR in the Python streaming read stack (#7152). Adds end-to-end acceptance tests for IncrementalDiffScanner and user-facing documentation for the streaming read API.

Acceptance tests (pypaimon/acceptance/incremental_diff_acceptance_test.py):

  • Verifies IncrementalDiffScanner produces correct row counts and data across snapshot pairs
  • Tests consumer tracking: pre-scan state, at-least-once commit timing (consumer not written until caller requests next plan), resume from persisted position, and consumer deletion
  • Runs against a real Paimon table (local filesystem or S3)

Streaming API docs (docs/content/pypaimon/python-api.md):

  • Documents StreamReadBuilder, AsyncStreamingTableScan, consumer ID usage, row kind, bucket filtering, and diff catch-up behaviour

Stacked on

This PR targets master directly (all prior PRs in the stack have merged).

Stack summary:

Tracking issue: #7152

tub and others added 3 commits March 16, 2026 16:33
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
test_streaming_catch_up_returns_same_data is covered by the unit test
test_stream_triggers_diff_catch_up_for_large_gap with stronger assertions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
to_arrow([]) already returns an empty Arrow table with the correct schema,
so the early return was dead code.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
create_splits([]) returns [] and to_arrow([]) returns an empty table,
so the early return was unnecessary.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@tub tub marked this pull request as ready for review March 16, 2026 17:32
Copy link
Contributor

@JingsongLi JingsongLi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@JingsongLi JingsongLi merged commit 61db454 into apache:master Mar 17, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants