Skip to content

Core: Add the position_deletes metadata table - #4487

Open
Anurag-S1ngh wants to merge 1 commit into
apache:mainfrom
Anurag-S1ngh:fix/1053-position-deletes
Open

Anurag-S1ngh wants to merge 1 commit into
apache:mainfrom
Anurag-S1ngh:fix/1053-position-deletes

Conversation

@Anurag-S1ngh

Copy link
Copy Markdown
Contributor

Rationale for this change

POSITION_DELETES is the last unchecked metadata table in #1053.

This adds Table.inspect.position_deletes(), which reads the live position delete files in a snapshot and returns one row per deleted position. Each row includes the target data file path, position, nullable row struct, partition, partition spec ID, and the path of the delete file. Deleted manifest entries and equality delete files are skipped.

The row column stays null because position delete files are not required to store the deleted row.

Part of #1053. The remaining ALL_ENTRIES table is added in #4481.

Are these changes tested?

Yes. Added tests for the empty-table result and for reading a real position delete file, including skipping deleted manifest entries.

  • pytest tests/table: 693 passed
  • ruff check and ruff format --check pass
  • ty check reports nothing for the new methods

Are there any user-facing changes?

Yes. New public API: Table.inspect.position_deletes().

Read live position delete files from a snapshot and expose file_path, pos, partition, spec_id, and delete_file_path. Row values remain null because delete files are not required to store them. Part of apache#1053.

This branch has not been deployed

No deployments
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.

1 participant