You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by ga...@apache.org on 2024/01/24 02:32:50 UTC

(seatunnel) branch apache_240124_default_tablename created (now cd51d2b940)

This is an automated email from the ASF dual-hosted git repository.

gaojun2048 pushed a change to branch apache_240124_default_tablename
in repository https://gitbox.apache.org/repos/asf/seatunnel.git


      at cd51d2b940 Use default tablepath when can not get the tablepath from source config

This branch includes the following new commits:

     new cd51d2b940 Use default tablepath when can not get the tablepath from source config

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(seatunnel) 01/01: Use default tablepath when can not get the tablepath from source config

Posted by ga...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gaojun2048 pushed a commit to branch apache_240124_default_tablename
in repository https://gitbox.apache.org/repos/asf/seatunnel.git

commit cd51d2b940eda99ddc18df0e4ded1c48873f4962
Author: Eric <ga...@gmail.com>
AuthorDate: Wed Jan 24 10:32:25 2024 +0800

    Use default tablepath when can not get the tablepath from source config
---
 .../java/org/apache/seatunnel/api/table/catalog/CatalogTableUtil.java   | 2 +-
 .../src/main/java/org/apache/seatunnel/api/table/catalog/TablePath.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/seatunnel-api/src/main/java/org/apache/seatunnel/api/table/catalog/CatalogTableUtil.java b/seatunnel-api/src/main/java/org/apache/seatunnel/api/table/catalog/CatalogTableUtil.java
index 6b8d19ea71..6f2b6adeb2 100644
--- a/seatunnel-api/src/main/java/org/apache/seatunnel/api/table/catalog/CatalogTableUtil.java
+++ b/seatunnel-api/src/main/java/org/apache/seatunnel/api/table/catalog/CatalogTableUtil.java
@@ -215,7 +215,7 @@ public class CatalogTableUtil implements Serializable {
         } else {
             Optional<String> resultTableNameOptional =
                     readonlyConfig.getOptional(CommonOptions.RESULT_TABLE_NAME);
-            tablePath = resultTableNameOptional.map(TablePath::of).orElse(TablePath.EMPTY);
+            tablePath = resultTableNameOptional.map(TablePath::of).orElse(TablePath.DEFAULT);
         }
 
         return CatalogTable.of(
diff --git a/seatunnel-api/src/main/java/org/apache/seatunnel/api/table/catalog/TablePath.java b/seatunnel-api/src/main/java/org/apache/seatunnel/api/table/catalog/TablePath.java
index 60f4b691bd..1257262187 100644
--- a/seatunnel-api/src/main/java/org/apache/seatunnel/api/table/catalog/TablePath.java
+++ b/seatunnel-api/src/main/java/org/apache/seatunnel/api/table/catalog/TablePath.java
@@ -34,7 +34,7 @@ public final class TablePath implements Serializable {
     private final String schemaName;
     private final String tableName;
 
-    public static final TablePath EMPTY = TablePath.of(null, null, null);
+    public static final TablePath DEFAULT = TablePath.of("default", "default", "default");
 
     public static TablePath of(String fullName) {
         return of(fullName, false);