-
Notifications
You must be signed in to change notification settings - Fork 315
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
[AMORO-2204] Support Spark 3.5 for mixed format tables #3428
base: master
Are you sure you want to change the base?
Conversation
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.
i left some tiny comment. PTAL
protected TableIdentifier generateChangeStoreIdentifier(TableIdentifier baseIdentifier) { | ||
return TableIdentifier.of( | ||
baseIdentifier.namespace(), | ||
baseIdentifier.name() + CHANGE_STORE_SEPARATOR + MixedTable.CHANGE_STORE_IDENTIFIER); |
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.
should we replace CHANGE_STORE_SEPARATOR
to this.separtor
baseIdentifier.name() + CHANGE_STORE_SEPARATOR + MixedTable.CHANGE_STORE_IDENTIFIER); | |
baseIdentifier.name() + CHANGE_STORE_SEPARATOR + MixedTable.CHANGE_STORE_IDENTIFIER); |
@@ -43,7 +44,6 @@ | |||
public class InternalMixedIcebergCatalog extends BasicMixedIcebergCatalog { | |||
|
|||
public static final String CHANGE_STORE_SEPARATOR = "@"; |
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.
@
is not validate for table name in hive
public static final String CHANGE_STORE_SEPARATOR = "@"; | |
public static final String CHANGE_STORE_SEPARATOR = "@"; |
properties.remove(TableCatalog.PROP_LOCATION); | ||
} | ||
try { | ||
if (properties.containsKey("primary.keys")) { |
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.
should we add a definition in TableProperties.class for "primary.keys" ?
// one order leads to different results | ||
Preconditions.checkArgument( | ||
setSnapshotId == null || pickSnapshotId == null, | ||
"Cannot set the current the current snapshot ID and cherry-pick snapshot changes"); |
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.
"Cannot set the current the current snapshot ID and cherry-pick snapshot changes"); | |
"Cannot set the current snapshot ID and cherry-pick snapshot changes at the same time"); | |
Map<String, String> properties = Maps.newHashMap(); | ||
properties.putAll(sourceTable.properties()); | ||
EXCLUDED_PROPERTIES.forEach(properties::remove); | ||
properties.put(TableCatalog.PROP_PROVIDER, "arctic"); |
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.
properties.put(TableCatalog.PROP_PROVIDER, "arctic"); | |
properties.put(TableCatalog.PROP_PROVIDER, "mixed_hive"); |
properties.putAll(sourceTable.properties()); | ||
EXCLUDED_PROPERTIES.forEach(properties::remove); | ||
properties.put(TableCatalog.PROP_PROVIDER, "arctic"); | ||
properties.put("migrated", "true"); |
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.
Add a prefix to indicate that this parameter is used by amoro.
properties.put("migrated", "true"); | |
properties.put("amoro.migrated", "true"); |
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.
LGTM
Why are the changes needed?
Close #2204.
Brief change log
How was this patch tested?
Add some test cases that check the changes thoroughly including negative and positive cases if possible
Add screenshots for manual tests if appropriate
Run test locally before making a pull request
Documentation