sumeetgajjar commented on code in PR #4942:
URL: https://github.com/apache/iceberg/pull/4942#discussion_r890276891
##########
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 assertion checks if the namespace that `sql("CREATE NAMESPACE %s",
fullNamespace);` creats is in fact created or not.
Now, instead of having only one namespace i.e. "db" which is created using
`CREATE NAMESPACE` stmt we have two; one is "db" and the other is "default"
that is created in the constructor of the `SparkTestBaseWithCatalog` class
during setup.
Assuming the objective of the assertion was to check if the "db" namespace
was created or not and even after the changes that this PR introduces the aim
is still met, thus there's no change in behavior.
--
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]