talatuyarer commented on code in PR #12808:
URL: https://github.com/apache/iceberg/pull/12808#discussion_r2059726132


##########
bigquery/src/test/java/org/apache/iceberg/gcp/bigquery/TestBigQueryCatalog.java:
##########
@@ -0,0 +1,673 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.iceberg.gcp.bigquery;
+
+import static org.apache.iceberg.CatalogUtil.ICEBERG_CATALOG_TYPE;
+import static org.apache.iceberg.CatalogUtil.ICEBERG_CATALOG_TYPE_BIGQUERY;
+import static 
org.apache.iceberg.gcp.bigquery.BigQueryMetastoreCatalog.PROJECT_ID;
+import static 
org.apache.iceberg.gcp.bigquery.BigQueryMetastoreCatalog.TESTING_ENABLED;
+import static org.apache.iceberg.types.Types.NestedField.optional;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+import org.apache.iceberg.CatalogProperties;
+import org.apache.iceberg.CatalogUtil;
+import org.apache.iceberg.PartitionSpec;
+import org.apache.iceberg.Schema;
+import org.apache.iceberg.SortOrder;
+import org.apache.iceberg.Table;
+import org.apache.iceberg.TableUtil;
+import org.apache.iceberg.Transaction;
+import org.apache.iceberg.catalog.CatalogTests;
+import org.apache.iceberg.catalog.Namespace;
+import org.apache.iceberg.catalog.TableIdentifier;
+import org.apache.iceberg.exceptions.NoSuchNamespaceException;
+import org.apache.iceberg.exceptions.NoSuchTableException;
+import org.apache.iceberg.expressions.Expressions;
+import org.apache.iceberg.relocated.com.google.common.collect.ImmutableMap;
+import org.apache.iceberg.types.Types;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.io.TempDir;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.ValueSource;
+
+public class TestBigQueryCatalog extends 
CatalogTests<BigQueryMetastoreCatalog> {
+
+  private static final String GCP_PROJECT = "project-id";
+  private static final String CATALOG_ID = "catalog-name";
+
+  // another schema that is not the same
+  protected static final Schema OTHER_SCHEMA_OPTIONAL =
+      new Schema(optional(1, "some_id", Types.IntegerType.get()));
+
+  // Schema passed to create tables
+  protected static final Schema SCHEMA_OPTIONAL =
+      new Schema(
+          optional(3, "id", Types.IntegerType.get(), "unique ID 🤪"),
+          optional(4, "data", Types.StringType.get()));
+
+  // This is the actual schema for the table, with column IDs reassigned
+  protected static final Schema REPLACE_SCHEMA_OPTIONAL =
+      new Schema(
+          optional(2, "id", Types.IntegerType.get(), "unique ID 🤪"),
+          optional(3, "data", Types.StringType.get()));
+
+  protected static final PartitionSpec REPLACE_SPEC_OPTIONAL =
+      PartitionSpec.builderFor(REPLACE_SCHEMA_OPTIONAL).bucket("id", 
16).withSpecId(1).build();
+
+  protected static final SortOrder REPLACE_WRITE_ORDER_OPTIONAL =

Review Comment:
   yes it can, but I copied them from CatalogTests I just changed with optional 
field. I want to keep as is. Soon I will remove these tests whenever we start 
supporting required filed change. 



-- 
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]

Reply via email to