-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Spark: Update register table procedure test case for all the catalogs #6787
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
Conversation
| } | ||
|
|
||
| @Test | ||
| public void testRegisterTable() throws NoSuchTableException, ParseException { |
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.
So we aren't actually adding any more tests here we are just removing this Assume clause?
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.
Yes.
Already API level test is there for each catalog for register table.
Configuring other catalogs in this test case is hard (like Glue, REST). It is better to keep them as integration tests (may in in a follow up PR)
Now removing this check will make sure that this testcase runs for hadoop, hive, spark catalog.
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.
How do we Register a table in Hadoop? That doesn't sound possible
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.
HadoopCatalog also extends BaseMetastoreCatalog
So, when a register table is called. It makes a fresh commit to the Hadoop catalog too (file name will be as per hadoop catalog)
https://github.com/apache/iceberg/blob/master/core/src/main/java/org/apache/iceberg/BaseMetastoreCatalog.java#L84
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.
Existing testcase for hadoop catalog
https://github.com/apache/iceberg/blob/master/core/src/test/java/org/apache/iceberg/hadoop/TestHadoopCatalog.java#L637
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.
OK Got it, Still not sure I think that was a good idea but it's already in.
PR #5037 supports register tables for all (most of) the catalogs.
There is no restriction in the register table procedure about catalog type. But the testcase has a restriction.
Hence, update the testcase to test for all the catalogs.