-
Notifications
You must be signed in to change notification settings - Fork 744
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
[GOBBLIN-2157] Copy table properties in iceberg distcp #4056
[GOBBLIN-2157] Copy table properties in iceberg distcp #4056
Conversation
combinedMetadataProperties.putAll(dstMetadata.properties()); | ||
combinedMetadataProperties.putAll(srcMetadata.properties()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add a comment that captures the reasoning behind overshadowing dest with src
…e properties with source table
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4056 +/- ##
============================================
- Coverage 45.12% 41.15% -3.97%
+ Complexity 3199 2220 -979
============================================
Files 705 483 -222
Lines 26949 20490 -6459
Branches 2680 2373 -307
============================================
- Hits 12160 8433 -3727
+ Misses 13781 11157 -2624
+ Partials 1008 900 -108 ☔ View full report in Codecov by Sentry. |
@Will-Lo
Update - Saw the thread, if catalog is handling which properties to accept and which to not then it is good. |
Dear Gobblin maintainers,
Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!
JIRA
Description
The existing iceberg registration step has the following snippet:
Since Iceberg's
replaceProperties
https://github.com/apache/iceberg/blob/e449d3405cfdb304c94835845bd8f34a73b4a517/core/src/main/java/org/apache/iceberg/TableMetadata.java#L583 just replaces the full set of properties, not just any existing properties, the result is that all of the properties are equivalent to the destination table metadata properties. Which effectively copies no properties.This PR modifies this behavior so that the destination table properties can be overwritten by the source table properties if the source table updates existing properties, as well as maintaining any existing properties in the destination that is not defined on the source.
Tests
Unit tests
Commits