You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@paimon.apache.org by lz...@apache.org on 2023/04/21 11:28:22 UTC
[incubator-paimon] branch master updated: [flink] Modify the error prompt when creating a flink table using FlinkCatalog (#968)
This is an automated email from the ASF dual-hosted git repository.
lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-paimon.git
The following commit(s) were added to refs/heads/master by this push:
new 784f0dd82 [flink] Modify the error prompt when creating a flink table using FlinkCatalog (#968)
784f0dd82 is described below
commit 784f0dd82acf92054072a4cf4e0682cf070a77e5
Author: wgcn <10...@qq.com>
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