nastra commented on code in PR #9417:
URL: https://github.com/apache/iceberg/pull/9417#discussion_r1442872510
##########
spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/TestFunctionCatalog.java:
##########
@@ -27,107 +30,106 @@
import org.apache.spark.sql.connector.catalog.FunctionCatalog;
import org.apache.spark.sql.connector.catalog.Identifier;
import org.apache.spark.sql.connector.catalog.functions.UnboundFunction;
-import org.assertj.core.api.Assertions;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.TestTemplate;
-public class TestFunctionCatalog extends SparkTestBaseWithCatalog {
+public class TestFunctionCatalog extends TestBaseWithCatalog {
private static final String[] EMPTY_NAMESPACE = new String[] {};
private static final String[] SYSTEM_NAMESPACE = new String[] {"system"};
private static final String[] DEFAULT_NAMESPACE = new String[] {"default"};
private static final String[] DB_NAMESPACE = new String[] {"db"};
- private final FunctionCatalog asFunctionCatalog;
+ private FunctionCatalog asFunctionCatalog;
- public TestFunctionCatalog() {
+ @BeforeEach
+ public void before() {
+ super.before();
this.asFunctionCatalog = castToFunctionCatalog(catalogName);
+ createDefaultNamespace();
}
- @Before
public void createDefaultNamespace() {
Review Comment:
no need to have this separate method now. Can you just move `sql("CREATE
NAMESPACE IF NOT EXISTS %s", catalogName + ".default");` to `before()`?
--
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]