nastra commented on code in PR #9401:
URL: https://github.com/apache/iceberg/pull/9401#discussion_r1445284087


##########
spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/sql/TestCreateTableAsSelect.java:
##########
@@ -21,40 +21,64 @@
 import static org.apache.spark.sql.functions.col;
 import static org.apache.spark.sql.functions.lit;
 import static org.apache.spark.sql.functions.when;
+import static org.assertj.core.api.Assertions.assertThat;
 
-import java.util.Map;
+import org.apache.iceberg.Parameter;
+import org.apache.iceberg.Parameters;
 import org.apache.iceberg.PartitionSpec;
 import org.apache.iceberg.Schema;
 import org.apache.iceberg.Table;
-import org.apache.iceberg.relocated.com.google.common.collect.Iterables;
-import org.apache.iceberg.spark.SparkCatalogTestBase;
+import org.apache.iceberg.spark.CatalogTestBase;
+import org.apache.iceberg.spark.SparkCatalogConfig;
 import org.apache.iceberg.types.Types;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Test;
-
-public class TestCreateTableAsSelect extends SparkCatalogTestBase {
-
-  private final String sourceName;
-
-  public TestCreateTableAsSelect(
-      String catalogName, String implementation, Map<String, String> config) {
-    super(catalogName, implementation, config);
-    this.sourceName = tableName("source");
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.TestTemplate;
+
+public class TestCreateTableAsSelect extends CatalogTestBase {
+
+  @Parameter(index = 3)
+  private String sourceName;
+
+  @Parameters(name = "catalogName = {0}, implementation = {1}, config = {2}, 
sourceName = {3}")
+  protected static Object[][] parameters() {
+    return new Object[][] {
+      {
+        SparkCatalogConfig.HIVE.catalogName(),
+        SparkCatalogConfig.HIVE.implementation(),
+        SparkCatalogConfig.HIVE.properties(),
+        "testhive.default.source"

Review Comment:
   we should probably use `SparkCatalogConfig.HIVE.catalogName()` to construct 
this here and further below



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to