Skip to content

Row Lineage: Add metadata column support for _row_id - #4375

Merged
Fokko merged 1 commit into
apache:mainfrom
rambleraptor:metadata-columns
Nov 14, 2026
Merged

Fokko merged 1 commit into
apache:mainfrom
rambleraptor:metadata-columns

Conversation

@rambleraptor

Copy link
Copy Markdown
Collaborator

Rationale for this change

I'm continuing my work on finishing up row lineage support.

It doesn't appear that PyIceberg has built anything around metadata columns. Row lineage is made up of two fields: _row_id and _last_updated_sequence_number, which are both deemed metadata columns by the spec.

I wanted to begin adding some of the infrastructure for defining metadata columns as well as wiring up _row_id.

Are these changes tested?

Included some unit tests and a Spark integration test.

Are there any user-facing changes?

@Fokko Fokko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thanks @rambleraptor! This aligns with the spec and the Java RowIdReader.

Comment thread pyiceberg/io/pyarrow.py
projected_missing_fields=projected_missing_fields,
allow_timestamp_tz_mismatch=True,
)
if row_id_index is not None and positions is not None:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: positions is always set when row_id_index is not None, so the positions is not None check is redundant.

@Fokko
Fokko added this pull request to the merge queue Nov 14, 2026
Merged via the queue into apache:main with commit fce8185 Nov 14, 2026
20 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