gh-yzou commented on code in PR #1190: URL: https://github.com/apache/polaris/pull/1190#discussion_r2021449864
########## plugins/spark/v3.5/src/test/java/org/apache/polaris/spark/SparkCatalogTest.java: ########## @@ -0,0 +1,97 @@ +/* + * 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.polaris.spark; + +import static org.apache.iceberg.CatalogProperties.CATALOG_IMPL; +import static org.assertj.core.api.Assertions.assertThatThrownBy; + +import java.util.Map; +import java.util.UUID; +import org.apache.iceberg.relocated.com.google.common.collect.Maps; +import org.apache.spark.sql.connector.catalog.Identifier; +import org.apache.spark.sql.types.StructType; +import org.apache.spark.sql.util.CaseInsensitiveStringMap; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.Mockito; + +public class SparkCatalogTest { + private SparkCatalog catalog; + private String catalogName; + + @BeforeEach + public void setup() { + catalogName = "test_" + UUID.randomUUID(); + Map<String, String> catalogConfig = Maps.newHashMap(); + catalogConfig.put(CATALOG_IMPL, "org.apache.iceberg.inmemory.InMemoryCatalog"); + catalogConfig.put("cache-enabled", "false"); + catalog = new SparkCatalog(); + catalog.initialize(catalogName, new CaseInsensitiveStringMap(catalogConfig)); + } + + @Test + public void testUnsupportedOperations() { Review Comment: I had this test mainly trying serve two purpose: 1) the code compiles and the catalog can be initialized 2) check the current behavior for all APIs, which throws an error at this moment. Once the APIs are supported, we will remove it from this test, and added other test, and when this test is fully removed, all supports are up. If there is no strong objection, I would like to keep the test here for the current behavior, and it will be removed once all APIs are supported -- 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...@polaris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org