hdygxsj commented on code in PR #2298: URL: https://github.com/apache/incubator-paimon/pull/2298#discussion_r1394195271
########## paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/FlinkExternalCatalogTest.java: ########## @@ -0,0 +1,243 @@ +/* + * 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.paimon.flink; + +import org.apache.paimon.catalog.AbstractCatalog; +import org.apache.paimon.fs.Path; +import org.apache.paimon.options.Options; + +import org.apache.flink.table.api.DataTypes; +import org.apache.flink.table.api.Schema; +import org.apache.flink.table.catalog.Catalog; +import org.apache.flink.table.catalog.CatalogTable; +import org.apache.flink.table.catalog.Column; +import org.apache.flink.table.catalog.ObjectPath; +import org.apache.flink.table.catalog.ResolvedCatalogTable; +import org.apache.flink.table.catalog.ResolvedSchema; +import org.apache.flink.table.catalog.exceptions.DatabaseAlreadyExistException; +import org.apache.flink.table.catalog.exceptions.DatabaseNotExistException; +import org.apache.flink.table.catalog.exceptions.TableAlreadyExistException; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; + +import java.io.File; +import java.io.IOException; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; + +/** Test for {@link FlinkExternalCatalog}. */ +public class FlinkExternalCatalogTest { Review Comment: Do you mean that I need to add mixed paimon and external table test cases to CatalogTestBase? The current External Table information is not stored using org.apache.paimon.catalog.Catalog , I persist it to a separate file path in FLINK_EXTERNAL_METADATA/TABLE by FileIO(this is mainly because tables that used other connectors cannot be used by other computing engines). It is also intended to persist the user's UDF in FLINK_EXTERNAL_METADATA/FUNCTION later.So I cannot mix paimon and external tables in the org.apache.paimon.catalog.Catalog. FlinkExternalCatalogTest already has test cases that use a mix of paimon and external tables. Do you have any better suggestions?  -- 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]
