-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Core: Avoid creating new metadata file when registerTable API is used
#6591
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
Core: Avoid creating new metadata file when registerTable API is used
#6591
Conversation
registerTable API is usedregisterTable API is used
registerTable API is usedregisterTable API is used
c8cb001 to
f597ce3
Compare
ajantha-bhat
left a comment
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.
PR description can be simplified by just keeping Core: instead of all the modules.
registerTable API is usedregisterTable API is used
f597ce3 to
cda5a05
Compare
szehon-ho
left a comment
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.
Makes sense to me, left some style comments
core/src/main/java/org/apache/iceberg/BaseMetastoreTableOperations.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/apache/iceberg/jdbc/JdbcTableOperations.java
Outdated
Show resolved
Hide resolved
HiveTableOperations and NessieTableOperations were already handling this case, but other table operations are missing this case.
cda5a05 to
85aaf12
Compare
szehon-ho
left a comment
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.
Thanks for addressing the comments. One more small one, and if it is not too much trouble, could we add a unit test in TestHiveCatalog for it for registerTable?
hive-metastore/src/main/java/org/apache/iceberg/hive/HiveTableOperations.java
Show resolved
Hide resolved
core/src/main/java/org/apache/iceberg/BaseMetastoreTableOperations.java
Outdated
Show resolved
Hide resolved
cc1e34d to
ccc8666
Compare
|
Thanks @krvikash looks good to me, just wanted to see if we can add a test in TestHiveCatalog? (Ignore if you read already and still working on it) |
|
Thanks, @szehon-ho for reviewing. Sorry, I missed adding a test case in |
szehon-ho
left a comment
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.
Thanks for adding test, one comment about that
hive-metastore/src/test/java/org/apache/iceberg/hive/TestHiveCatalog.java
Outdated
Show resolved
Hide resolved
5dca53e to
b146e87
Compare
b146e87 to
05cccd6
Compare
|
Thanks for last changes, Ill commit this tomorrow unless there's more comments. |
|
Thanks, @szehon-ho | @ajantha-bhat for reviewing the PR. |
|
Merged, thanks @krvikash for change, @ajantha-bhat for review |
HiveTableOperationsandNessieTableOperationswere already handling this case, but other table operations are missing this case.Follow up of #6512 (comment)