Skip to content
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

Delta Migration: Add version and timestamp tags for each Delta Lake transaction when add to Iceberg transaction #7450

Merged
merged 4 commits into from
Apr 28, 2023

Conversation

JonasJ-ap
Copy link
Contributor

@JonasJ-ap JonasJ-ap commented Apr 27, 2023

Fixes #6769

For each Iceberg transaction migrated, add delta-version-xxx and delta-ts-xxxxx tag to the snapshot. delta-version-xxx represents the logical delta lake version. delta-ts-xxxxx represents the commit time of the corresponding delta lake transaction

Signed-off-by: Rushan Jiang <rushanj@andrew.cmu.edu>
Signed-off-by: Rushan Jiang <rushanj@andrew.cmu.edu>
deltaVersionTimestamp
.toInstant()
.atZone(ZoneId.of(DELTA_TIME_STAMP_ZONE))
.format(DateTimeFormatter.ofPattern(DELTA_TIME_STAMP_FORMAT));
Copy link
Contributor

Choose a reason for hiding this comment

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

I am wondering how much it is worth doing this conversion, instead of just using the millisecond timestamp value. Any thoughts?

Copy link
Contributor

Choose a reason for hiding this comment

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

Thought about this a bit more, I think I would +1 for just using raw millisecond timestamp. Dealing with timezone is complex and should be avoided if there is no significant benefit. Also it leaves a space character in the tag, that might cause issue.

Signed-off-by: Rushan Jiang <rushanj@andrew.cmu.edu>
Signed-off-by: Rushan Jiang <rushanj@andrew.cmu.edu>
Copy link
Contributor

@jackye1995 jackye1995 left a comment

Choose a reason for hiding this comment

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

looks good to me!

@jackye1995
Copy link
Contributor

Thanks for adding the feature Jonas!

@jackye1995 jackye1995 merged commit b1d25db into apache:master Apr 28, 2023
manisin pushed a commit to Snowflake-Labs/iceberg that referenced this pull request May 9, 2023
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.

Support version travel by tag for Delta migrated table
2 participants