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

[ARCTIC-495]remove unnecessary properties when sync and commit properties to ams #496

Merged
merged 4 commits into from
Oct 20, 2022

Conversation

hameizi
Copy link
Contributor

@hameizi hameizi commented Oct 20, 2022

Why are the changes needed?

resolve #495
remove unnecessary properties when sync and commit properties to ams

Brief change log

remove unnecessary properties when sync and commit properties to ams

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

  • Does this pull request introduces a new feature? (no)
  • If yes, how is the feature documented? (not documented)

Copy link
Contributor

@zhoujinsong zhoujinsong left a comment

Choose a reason for hiding this comment

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

@hameizi I left some comments. PTAL.

@@ -47,5 +48,14 @@ public class ServerTableProperties {
HIDDEN_EXPOSED.add(TableProperties.READ_DISTRIBUTION_MODE_HASH);
HIDDEN_EXPOSED.add(TableProperties.PROTECTED_PROPERTIES.toString());
HIDDEN_EXPOSED.add(TableProperties.TABLE_EVENT_TIME_FIELD);

HIDDEN_INTERNAL.add("meta_store_site");
Copy link
Contributor

Choose a reason for hiding this comment

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

Could change these value with constant variables?

Copy link
Contributor Author

@hameizi hameizi Oct 20, 2022

Choose a reason for hiding this comment

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

Should we add a CatalogProperties class in core module?

@@ -303,6 +305,8 @@ public void syncDDl(ArcticTable arcticTable) {

public void syncProperties(TableMetadata tableMetadata, ArcticTable arcticTable) {
Table table = arcticTable.isKeyedTable() ? arcticTable.asKeyedTable().baseTable() : arcticTable.asUnkeyedTable();
PropertiesUtil.removeHiddenProperties(tableMetadata.getProperties(), ServerTableProperties.HIDDEN_INTERNAL);
Copy link
Contributor

Choose a reason for hiding this comment

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

This map is an immutable map, can not execute remove operation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed in new commit

Copy link
Contributor

@zhoujinsong zhoujinsong left a comment

Choose a reason for hiding this comment

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

LGTM.

@zhoujinsong zhoujinsong merged commit 33e5b4c into apache:master Oct 20, 2022
zhoujinsong added a commit that referenced this pull request Oct 20, 2022
#499)

[ARCTIC-495]remove unnecessary properties when sync and commit properties to ams (#496)

* remove unnecessary properties when sync and commit properties to ams

* fix immutable map can not remove and add unit test

* fix code style

* change log

Co-authored-by: wangzeyu <hameizi369@gmail.com>
hzluting pushed a commit to hzluting/arctic that referenced this pull request Oct 20, 2022
…ties to ams (apache#496)

* remove unnecessary properties when sync and commit properties to ams

* fix immutable map can not remove and add unit test

* fix code style

* change log
@hameizi hameizi deleted the hotfix branch November 15, 2022 11:15
zhoujinsong pushed a commit that referenced this pull request May 31, 2023
…ties to ams (#496)

* remove unnecessary properties when sync and commit properties to ams

* fix immutable map can not remove and add unit test

* fix code style

* change log
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.

[Improvement]: remove unnecessary properties when sync and commit properties to ams
3 participants