feat: add hms list namespaces#135
Conversation
01e574c to
f9ffe1f
Compare
| } | ||
|
|
||
| @Test | ||
| public void testListNamespacesV3() throws Exception { |
There was a problem hiding this comment.
wdyt about adding a test for an empty database?
There was a problem hiding this comment.
I think "hive.mydb" and "mycatalog.default" should cover empty databases. Please correct me if I miss anything.
| } else { | ||
| throw new RuntimeException(String.format("Namespace parent {} is too long.", parent)); | ||
| } | ||
| } catch (TException e) { |
There was a problem hiding this comment.
Since MetaException is derived from TException, it will be caught and wrapped with RuntimeException then throw. Do you mean we shouldn't wrap MetaException with a RuntimeException?
3cc1c31 to
9a81ed2
Compare
9a81ed2 to
7e76e38
Compare
|
|
||
| public class CoreKeys { | ||
| public static final String CATALOG_IMPL = "lance.namespace.catalog-impl"; | ||
| public static final String CATALOG_IMPL_DEFAULT = |
| assertEquals(Sets.newHashSet(), namespace.listNamespaces(request).getNamespaces()); | ||
|
|
||
| // Case 5: non-existing catalog, database, table. | ||
| request.setParent(Lists.list("nonexistedcatalog")); |
There was a problem hiding this comment.
HiveMetastore client returns an empty list if the catalog doesn't exist, and that's why we get an empty response for non existent catalogs.
Related to the spec, I see that the ListNamespace operation doesn’t define a not found exception for listing with parent. Is this intentional @jackye1995
There was a problem hiding this comment.
that seems like a miss, but maybe we can add that in a separated PR.
0b17a7a to
78721d3
Compare
78721d3 to
1de2bb5
Compare
jackye1995
left a comment
There was a problem hiding this comment.
thanks for the work @wojiaodoubao! There are some minor comments but I think we can address in later PRs along the way, let's go! And thanks @geruh for the review!
Closes #102