rdblue commented on code in PR #4942:
URL: https://github.com/apache/iceberg/pull/4942#discussion_r889720509
##########
spark/v3.2/spark/src/test/java/org/apache/iceberg/spark/SparkTestBaseWithCatalog.java:
##########
@@ -86,7 +86,7 @@ public SparkTestBaseWithCatalog(String catalogName, String
implementation, Map<S
this.tableName = (catalogName.equals("spark_catalog") ? "" : catalogName +
".") + "default.table";
- sql("CREATE NAMESPACE IF NOT EXISTS default");
+ createNamespace(validationNamespaceCatalog, Namespace.of("default"));
Review Comment:
Why is this needed? `IF NOT EXISTS` should check existence first, right?
##########
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:
What changed this 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]