Skip to content

Conversation

@ajantha-bhat
Copy link
Member

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.

@github-actions github-actions bot added the spark label Feb 9, 2023
@ajantha-bhat
Copy link
Member Author

@RussellSpitzer, @aokolnychyi

}

@Test
public void testRegisterTable() throws NoSuchTableException, ParseException {
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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

Copy link
Member Author

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

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.

RussellSpitzer
RussellSpitzer approved these changes Feb 9, 2023
@RussellSpitzer RussellSpitzer merged commit 2c9c5f8 into apache:master Feb 9, 2023
@ajantha-bhat ajantha-bhat deleted the register branch March 13, 2023 11:19
krvikash pushed a commit to krvikash/iceberg that referenced this pull request Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants