pvary commented on code in PR #4942:
URL: https://github.com/apache/iceberg/pull/4942#discussion_r933068130
##########
spark/v3.2/spark/src/test/java/org/apache/iceberg/spark/sql/TestNamespaceSQL.java:
##########
@@ -134,15 +134,9 @@ public void testListNamespace() {
List<Object[]> namespaces = sql("SHOW NAMESPACES IN %s", catalogName);
- if (isHadoopCatalog) {
- Assert.assertEquals("Should have 1 namespace", 1, namespaces.size());
- Set<String> namespaceNames = namespaces.stream().map(arr ->
arr[0].toString()).collect(Collectors.toSet());
- Assert.assertEquals("Should have only db namespace",
ImmutableSet.of("db"), namespaceNames);
- } else {
- Assert.assertEquals("Should have 2 namespaces", 2, namespaces.size());
- Set<String> namespaceNames = namespaces.stream().map(arr ->
arr[0].toString()).collect(Collectors.toSet());
- Assert.assertEquals("Should have default and db namespaces",
ImmutableSet.of("default", "db"), namespaceNames);
- }
+ Assert.assertEquals("Should have 2 namespaces", 2, namespaces.size());
+ Set<String> namespaceNames = namespaces.stream().map(arr ->
arr[0].toString()).collect(Collectors.toSet());
+ Assert.assertEquals("Should have default and db namespaces",
ImmutableSet.of("default", "db"), namespaceNames);
Review Comment:
The question is whether the test aims to test the creation using the `CREATE
NAMESPACE IF NOT EXISTS default` sql too, or the only goal was to test if the
NS is created by using the catalog API.
Someone with more knowledge about the Spark test could be good here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]