Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: Implement BaseMetastoreCatalog.registerTable() #5037
Core: Implement BaseMetastoreCatalog.registerTable() #5037
Changes from 4 commits
97c5a88
2654ec4
3a18e8b
a7d4b53
65a33be
984115b
58e6385
1cc00f3
8f9d9c9
d2ac693
ec18ade
3ef237a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Could we separate these tests for Nessie specific and general ones?
Could we run the "general" tests on every catalog, and move the
testRegisterTable
, andtestRegisterExistingTable
fromHiveTableTest
to this general place?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.
These test cases are specific to Nessie.
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.
If I understand correctly, the PR moves the
HiveCatalog.registerTable
to theBaseMetastoreCatalog
so it will be available for everyCatalog
which is inheriting fromBaseMetastoreCatalog
. So we should have a test for testing all of the catalogs that implement theregisterTable
that the method is working as expected.I understand that there are some Nessie specific test cases, but I think the basic functionality should be available and tested for all of the catalogs.
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 will add the said test-cases and would ping you then, thanks.
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 think we still miss:
I do not like the duplicated test code, and I think it would be good to have a general Catalog API test for checking the functionality of the new Catalog implementations. Something like
TestCatalog
but for all/most of the catalog API methods. We can do it in a different PR, but it would be good to have them. The test forregisterTable()
is a good candidate for these common tests.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 have put in test cases for Glue and DynamoDb as "Ignore" because I currently do not have an AWS account for testing them. I working on it.
Also, I would address the general Catalog API test in a follow-up PR.
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 got my AWS account setup, and have amended the test cases in Glue and DynamoDb Catalog, @pvary please have a look over the test cases.
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.
We do have
CatalogTests
, which is whatTestRESTCatalog
is built off of. It’s nice in that it has some methods for subclasses to declare if the catalog being tested supports certain features, so individual tests can exit early if they don’t support an optional feature (similar to JUnitAssume
).For example if the catalog in question doesn’t support namespace properties.
Might be good to see if that can be made to fit this need or can otherwise get some ideas from it. I believe Nessie also implements these tests.
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.
A good suggestion of using
CatalogTests
, but the duplicated test code referred to under these comments above shall not be resolved usingCatalogTests
.Reason:
The duplicated test code is with two of the test cases, i.e., testRegisterTable() and testRegisterExistingTable() in three of the catalog test files.
Out of these only the Jdbc catalog is one which can use
CatalogTests
, others do not useCatalogTests
.Thus, it won't be helpful to consider
CatalogTests
under this comment.@pvary Also has mentioned that we must consider a
Catalog API test
similar to CatalogTests, but this time for all the catalogs,but as decided we must come up with a follow-up PR, here, let's only focus on the
registerTable
functionality inBaseMetastoreCatalog
.