[Append Scan] Introduce IncrementalAppendScan class (without integration tests)#2234
Open
smaheshwar-pltr wants to merge 4 commits intoapache:mainfrom
Open
[Append Scan] Introduce IncrementalAppendScan class (without integration tests)#2234smaheshwar-pltr wants to merge 4 commits intoapache:mainfrom
IncrementalAppendScan class (without integration tests)#2234smaheshwar-pltr wants to merge 4 commits intoapache:mainfrom
Conversation
smaheshwar-pltr
commented
Jul 22, 2025
|
|
||
| append_snapshot_ids: Set[int] = {snapshot.snapshot_id for snapshot in append_snapshots} | ||
|
|
||
| manifests = { |
Contributor
Author
There was a problem hiding this comment.
smaheshwar-pltr
commented
Jul 22, 2025
| limit=limit, | ||
| ) | ||
|
|
||
| def incremental_append_scan( |
Contributor
Author
There was a problem hiding this comment.
smaheshwar-pltr
commented
Jul 22, 2025
Comment on lines
+1172
to
+1173
| Optional ID of the "from" snapshot, to start the incremental scan from, exclusively. This can be set | ||
| on the IncrementalAppendScan object returned, but ultimately must not be None. |
Contributor
Author
There was a problem hiding this comment.
smaheshwar-pltr
commented
Jul 22, 2025
| return current_schema.select(*self.selected_fields, case_sensitive=self.case_sensitive) | ||
|
|
||
| def plan_files(self) -> Iterable[FileScanTask]: | ||
| from_snapshot_id, to_snapshot_id = self._validate_and_resolve_snapshots() |
Contributor
Author
There was a problem hiding this comment.
smaheshwar-pltr
commented
Jul 22, 2025
| ).plan_files( | ||
| manifests=list(manifests), | ||
| manifest_entry_filter=lambda manifest_entry: manifest_entry.snapshot_id in append_snapshot_ids | ||
| and manifest_entry.status == ManifestEntryStatus.ADDED, |
Contributor
Author
There was a problem hiding this comment.
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.
Note: Contains changes from
AbstractTableScanwith default methods #2230__eq__and__hash__methods toManifestFile#2233Smaller diff from those changes: smaheshwar-pltr#5.
Rationale for this change
Split up from incremental append scan work - see #2031 (comment). PyIceberg doesn't support incremental reading of appended data between snapshots, like Spark does.
This PR adds equality adds the
IncrementalAppendScanclass and the API for constructing it onpyiceberg.Table.Are these changes tested?
Integration tests are separated into a different PR - #2235, to keep this one small.
Are there any user-facing changes?
Ignoring the other PRs, there's a new scan class and method on
Table.