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

[#351] feat(catalog-lakehouse): make IcebergTableOps#updateTable more convenient #383

Merged
merged 1 commit into from
Sep 19, 2023
Merged

Conversation

FANNG1
Copy link
Contributor

@FANNG1 FANNG1 commented Sep 13, 2023

What changes were proposed in this pull request?

add a new updateTable interface in IcebergTableOps

Why are the changes needed?

graviton developer could pass TableChange to IcebergTableOps, and no need to care about details of Iceberg

fixes: #351

Does this PR introduce any user-facing change?

No

How was this patch tested?

UT

@FANNG1 FANNG1 marked this pull request as draft September 13, 2023 02:55
@github-actions
Copy link

github-actions bot commented Sep 13, 2023

Code Coverage Report

Overall Project 63.4% -0.25% 🟢
Files changed 88.29% 🟢

Module Coverage
catalog-lakehouse 91.65% -6.42% 🟢
api 69.87% 🟢
Files
Module File Coverage
catalog-lakehouse IcebergTableOps.java 90% 🟢
IcebergTableOpsHelper.java 87.97% -12.03% 🟢
api TableChange.java 85.09% 🟢

@FANNG1 FANNG1 marked this pull request as ready for review September 13, 2023 13:23
@FANNG1
Copy link
Contributor Author

FANNG1 commented Sep 13, 2023

@yunqing-wei @jerryshao , this's pr is ready to review

@jerryshao
Copy link
Contributor

@yunqing-wei can you please review firstly?

@Clearvive
Copy link
Contributor

@yunqing-wei can you please review firstly?

Suggestions for modifications were made in the review, and Xiaojing is currently making the changes.

@jerryshao
Copy link
Contributor

I think you should leave all the review comments on the PR, not just sync up off-line.

@Clearvive
Copy link
Contributor

+1

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.

If this PR is mainly targeted to add a bunch of helper methods to convert from Graviton's TableChange to Iceberg's UpdateSchema, I would suggest:

  1. Writing all these converters to a new so-called adapter class or helper class. Leave the IcebergTableOps here all about the Iceberg operations.
  2. Differentiate the parameter name, if the parameter is iceberg's, then using icebergXxx, if from Graviton, use gravitonXxx.

@jerryshao jerryshao changed the title [#351] feat(lakehouse): make IcebergTableOps#updateTable more conveni… [#351] feat(catalog-lakehouse): make IcebergTableOps#updateTable more convenient Sep 18, 2023
@FANNG1
Copy link
Contributor Author

FANNG1 commented Sep 18, 2023

  1. Writing all these converters to a new so-called adapter class or helper class. Leave the IcebergTableOps here all about the Iceberg operations.

add IcebergTableOpsHelper to transfer from TableChange of Graviton to IcebergTableChange. IcebergCatalogOperations should use the following code to updateTable. cc @yunqing-wei

    IcebergTableChange icebergTableChange =
        icebergTableOpsHelper.makeIcebergTableChanges(gravitonNameIdentifier, gravitonTableChanges);
    return icebergTableOps.updateTable(icebergTableChange);
  1. Differentiate the parameter name, if the parameter is iceberg's, then using icebergXxx, if from Graviton, use gravitonXxx.

fixed.

@jerryshao
Copy link
Contributor

There're some style issues, please fix them first.

@FANNG1
Copy link
Contributor Author

FANNG1 commented Sep 19, 2023

There're some style issues, please fix them first.

done

@jerryshao jerryshao merged commit 4c66ab6 into apache:main Sep 19, 2023
2 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.

[Subtask] make IcebergTableOps#updateTable more convenient for IcebergCatalog
3 participants