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. 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?
   
   -----
   我的英语不太好,我的意思如下:
   你的意思是我需要在CatalogTestBase 
中增加使用混合使用paimon表和外部表的测试用例吗?我现在持久化外部表没有使用org.apache.paimon.catalog.Catalog,而是把它的元数据信息序列化后通过FileIO保存到了FLINK_EXTERNAL_METADATA/TABLE路径下。并且以后打算把UDF保存到FLINK_EXTERNAL_METADATA/FUNCTION。
   
所以我没法在org.apache.paimon.catalog.Catalog中混合使用paimon表和外部表。FlinkExternalCatalogTest
 中已经有了混合使用paimon和tables的用例。您有什么更好的建议吗。
   
   
![image](https://github.com/apache/incubator-paimon/assets/35210666/37c8f0ab-108b-40ef-bbfc-c17ca423e9b2)
   



##########
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. 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?
   
   -----
   我的英语不太好,我的意思如下:
   你的意思是我需要在CatalogTestBase 
中增加使用混合使用paimon表和外部表的测试用例吗?我现在持久化外部表没有使用org.apache.paimon.catalog.Catalog,而是把它的元数据信息序列化后通过FileIO保存到了FLINK_EXTERNAL_METADATA/TABLE路径下。并且以后打算把UDF保存到FLINK_EXTERNAL_METADATA/FUNCTION。
   
所以我没法在org.apache.paimon.catalog.Catalog中混合使用paimon表和外部表。FlinkExternalCatalogTest
 中已经有了混合使用paimon和tables的用例。您有什么更好的建议吗。
   
   
![image](https://github.com/apache/incubator-paimon/assets/35210666/37c8f0ab-108b-40ef-bbfc-c17ca423e9b2)
   



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

Reply via email to