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

[#2455] feat(core): Support pluggable catalog operations #2477

Merged
merged 11 commits into from
Mar 14, 2024

Conversation

FANNG1
Copy link
Contributor

@FANNG1 FANNG1 commented Mar 8, 2024

What changes were proposed in this pull request?

  1. add a hacky catalog config 'ops-impl' to specify the custom catalog operation
  2. some changes to CatalogOperation
    a. move entity from XXCatalogOperation constructor to initialize(), to construct custom catalog operation using reflect easily.
    b. move CatalogOperation#initialize() from XXCatalogOperation#newOps() to BaseCatalog#Ops(), because initialize is the API, it should be called explicitly by the framework not by specific XXCatalogOperation.

Why are the changes needed?

Fix: #2455

Does this PR introduce any user-facing change?

no

How was this patch tested?

UT and IT

@FANNG1 FANNG1 marked this pull request as draft March 8, 2024 07:43
@FANNG1 FANNG1 changed the title [SIP] Support pluggable catalog operations [SIP][#2455] Support pluggable catalog operations Mar 8, 2024
@FANNG1 FANNG1 force-pushed the operation branch 6 times, most recently from 7c64286 to d0a1138 Compare March 12, 2024 08:45
@FANNG1 FANNG1 marked this pull request as ready for review March 12, 2024 11:48
@FANNG1
Copy link
Contributor Author

FANNG1 commented Mar 12, 2024

@jerryshao @mchades @yuqi1129 , it's ready to review now, please help to review when you are free.

@FANNG1
Copy link
Contributor Author

FANNG1 commented Mar 12, 2024

@TEOTEO520 please help to review when you are free.

@FANNG1 FANNG1 changed the title [SIP][#2455] Support pluggable catalog operations [#2455] Support pluggable catalog operations Mar 13, 2024
@FANNG1
Copy link
Contributor Author

FANNG1 commented Mar 13, 2024

@jerryshao , comment are addressed, please review again

}

@Override
public void initialize(Map<String, String> config) throws RuntimeException {
public void initialize(Map<String, String> config, CatalogEntity entity) throws RuntimeException {
this.entity = entity;
Copy link
Member

Choose a reason for hiding this comment

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

Could we introduce BaseCatalogOperations to extract common behavior like this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's common to extract entity store, properties, but the main logic is catalog-specific, I'm not sure whether it's worth to do this.

@mchades
Copy link
Contributor

mchades commented Mar 13, 2024

Have you tested whether custom CatalogOperations can successfully pass end-to-end tests?

@FANNG1
Copy link
Contributor Author

FANNG1 commented Mar 13, 2024

Have you tested whether custom CatalogOperations can successfully pass end-to-end tests?

good point, I could run pass HiveCatalogIT using custom catalog operations in local machine.

@jerryshao jerryshao changed the title [#2455] Support pluggable catalog operations [#2455] feat(core): Support pluggable catalog operations Mar 13, 2024
Copy link
Contributor

@jerryshao jerryshao left a comment

Choose a reason for hiding this comment

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

LGTM.

@jerryshao jerryshao merged commit 94912a7 into apache:main Mar 14, 2024
12 checks passed
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] implement pluggable catalog operation
5 participants