pvary commented on code in PR #4942:
URL: https://github.com/apache/iceberg/pull/4942#discussion_r889671062
##########
spark/v3.0/spark/src/test/java/org/apache/iceberg/spark/SparkTestBase.java:
##########
@@ -73,11 +73,7 @@ public static void startMetastoreAndSpark() {
SparkTestBase.catalog = (HiveCatalog)
CatalogUtil.loadCatalog(HiveCatalog.class.getName(), "hive",
ImmutableMap.of(), hiveConf);
- try {
- catalog.createNamespace(Namespace.of("default"));
- } catch (AlreadyExistsException ignored) {
- // the default namespace already exists. ignore the create error
- }
+ createNamespace(catalog, Namespace.of("default"));
Review Comment:
Your answer helped me to understand, why I felt ambiguous about this
solution. We are in the same situation here than in the other places, like
TestSparkReaderDeletes.java, and there we chose to inline the check.
--
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]