This is an automated email from the ASF dual-hosted git repository. lzljs3620320 pushed a commit to branch release-0.4 in repository https://gitbox.apache.org/repos/asf/incubator-paimon.git
commit b24f9f4a9dc7cc025743cf7d352bfff099e882ec Author: wgcn <[email protected]> AuthorDate: Fri Apr 21 19:28:17 2023 +0800 [flink] Modify the error prompt when creating a flink table using FlinkCatalog (#968) --- .../src/main/java/org/apache/paimon/flink/FlinkCatalog.java | 7 +++++-- .../src/test/java/org/apache/paimon/flink/FlinkCatalogTest.java | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/FlinkCatalog.java b/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/FlinkCatalog.java index 091f08f2b..988b307b2 100644 --- a/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/FlinkCatalog.java +++ b/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/FlinkCatalog.java @@ -199,8 +199,11 @@ public class FlinkCatalog extends AbstractCatalog { if (options.containsKey(CONNECTOR.key())) { throw new CatalogException( String.format( - "Paimon Catalog only supports paimon tables, not '%s' connector." - + " You can create TEMPORARY table instead.", + "Paimon Catalog only supports paimon tables ," + + " and you don't need to specify 'connector'= '" + + FlinkCatalogFactory.IDENTIFIER + + "' when using Paimon Catalog\n" + + " You can create TEMPORARY table instead if you want to create the table of other connector.", options.get(CONNECTOR.key()))); } diff --git a/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/FlinkCatalogTest.java b/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/FlinkCatalogTest.java index 1af579c61..df8680704 100644 --- a/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/FlinkCatalogTest.java +++ b/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/FlinkCatalogTest.java @@ -193,8 +193,11 @@ public class FlinkCatalogTest { assertThatThrownBy(() -> catalog.createTable(this.path1, newTable, false)) .isInstanceOf(CatalogException.class) .hasMessageContaining( - "Paimon Catalog only supports paimon tables," - + " not 'filesystem' connector. You can create TEMPORARY table instead."); + "Paimon Catalog only supports paimon tables ," + + " and you don't need to specify 'connector'= '" + + FlinkCatalogFactory.IDENTIFIER + + "' when using Paimon Catalog\n" + + " You can create TEMPORARY table instead if you want to create the table of other connector."); } @ParameterizedTest
