[python][daft] Support timestamp time travel in read_paimon#8527
Open
kerwin-zk wants to merge 1 commit into
Open
[python][daft] Support timestamp time travel in read_paimon#8527kerwin-zk wants to merge 1 commit into
kerwin-zk wants to merge 1 commit into
Conversation
136f717 to
270751a
Compare
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.
Purpose
The Daft connector's
read_paimon/explain_paimon_scanpreviously only supported time travel bysnapshot_idandtag_name. This adds atimestampargument so users can time-travel to the latest snapshot at or before a given time — the third form Paimon already supports at the core level (scan.timestamp-millis/scan.timestamp). Only the Daft wrapper was missing; core is unchanged.timestampis dispatched by type:int(epoch milliseconds) ordatetime.datetime->scan.timestamp-millis(a naivedatetimeis interpreted in the local timezone)str(e.g.'2026-07-09 10:00:00') ->scan.timestampsnapshot_id,tag_nameandtimestampare mutually exclusive; setting more than one raisesValueError.Docs:
docs/docs/pypaimon/daft.mdtime-travel section updated with thetimestampexample and parameter description.Tests
Added to
tests/daft/daft_integration_test.py:test_read_paimon_with_timestamp— end-to-end: with a cutoff between two commits, both the millis anddatetimeforms return only the first snapshot.test_timestamp_scan_option_mapping— unit coverage of the type→option mapping (int / str / datetime;boolandfloatrejected).test_read_paimon_rejects_multiple_time_travel— parametrized mutual-exclusion checks (replaces the old two-way check).All
tests/daft/pass locally (163 passed, 1 skipped); flake8 clean underdev/cfg.ini.