Skip to content

Spark 4.0: Row Lineage support #13310

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

amogh-jahagirdar
Copy link
Contributor

This change implements spark 4.0 with Iceberg v3's row lineage feature; this approach uses the new conditional nullification mechanism introduced in 4.0 instead of custom rules that we implemented for 3.5

@github-actions github-actions bot added the spark label Jun 14, 2025
Comment on lines +128 to +134
if (writeIncludesRowLineage) {
sparkWriteSchema = sparkWriteSchema.add("_row_id", LongType$.MODULE$);
sparkWriteSchema =
sparkWriteSchema.add(
MetadataColumns.LAST_UPDATED_SEQUENCE_NUMBER.name(), LongType$.MODULE$);
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Separate helper method updateSparkWriteSchemaWithLineage would make it clearer

@amogh-jahagirdar amogh-jahagirdar force-pushed the spark-4.0-row-lineage branch 2 times, most recently from 7dcb5a2 to be78ef5 Compare June 15, 2025 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant