Repository navigation
Conversation
Contributor
|
@YuangGao What if a table already has data and someone overwrites it with an empty table (using the the situation you're merging a fix for flowchart TD
A["no snapshot"] --> B["append(0 rows)"]
B --> C["snapshot with 0 manifests"]
C --> D["inspect.files() / all_files()"]
D --> E["results = []<br/>unique_manifests = {}"]
E --> F{"guard?"}
F -- "before: none" --> G["ArrowInvalid"]
F -- "after: not empty" --> H["empty_table(), 0 rows"]
what the new logic can introduce flowchart TD
A["append 3 rows"] --> B["snapshot 1: APPEND<br/>1 manifest, 1 data file"]
B --> C["overwrite with an empty table"]
C --> D["snapshot 2: DELETE<br/>1 manifest, 0 entries"]
C --> E["snapshot 3: APPEND<br/>0 manifests"]
D --> F["current snapshot = 3"]
E --> F
F --> G["files(): 0 rows"]
F --> H["all_files(): manifests from snapshots 1 and 2<br/>unique_manifests = 2"]
H -->|"guard on all snapshots"| I["1 row, history kept"]
H -->|"guard on current snapshot only"| J["0 rows, history lost<br/>13 tests pass"]
|
This branch has not been deployed
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.
Closes #4269
Rationale for this change
_files/_all_filesthen callpa.concat_tables([]), which raisesArrowInvalid.Are these changes tested?
test_inspect.py—files,data_files,delete_files,all_files,all_data_filesandall_delete_fileson a snapshot without manifests.Are there any user-facing changes?