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 c5febed8d [hotfix] Reject table without connector key for 
FlinkGenericCatalog
c5febed8d is described below

commit c5febed8d05a64f8a59ed5f58a370b226242f7e1
Author: Jingsong <[email protected]>
AuthorDate: Tue Aug 22 11:42:59 2023 +0800

    [hotfix] Reject table without connector key for FlinkGenericCatalog
---
 .../src/main/java/org/apache/paimon/flink/FlinkGenericCatalog.java    | 4 ++++
 1 file changed, 4 insertions(+)

diff --git 
a/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/FlinkGenericCatalog.java
 
b/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/FlinkGenericCatalog.java
index 2a3962223..dadc80b7b 100644
--- 
a/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/FlinkGenericCatalog.java
+++ 
b/paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/FlinkGenericCatalog.java
@@ -177,6 +177,10 @@ public class FlinkGenericCatalog extends AbstractCatalog {
     public void createTable(ObjectPath tablePath, CatalogBaseTable table, 
boolean ignoreIfExists)
             throws TableAlreadyExistException, DatabaseNotExistException, 
CatalogException {
         String connector = table.getOptions().get(CONNECTOR.key());
+        if (connector == null) {
+            throw new RuntimeException(
+                    "FlinkGenericCatalog can not create table without 
'connector' key.");
+        }
         if (FlinkCatalogFactory.IDENTIFIER.equals(connector)) {
             paimon.createTable(tablePath, table, ignoreIfExists);
         } else {

Reply via email to