You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by yx...@apache.org on 2024/09/23 10:46:34 UTC

(shardingsphere) branch master updated: Refactor DataNode format (#32964)

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

yx9o pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 5cc2f09896e Refactor DataNode format (#32964)
5cc2f09896e is described below

commit 5cc2f09896e110529222c97db7d79b5a7e3319bf
Author: Haoran Meng <me...@gmail.com>
AuthorDate: Mon Sep 23 18:46:28 2024 +0800

    Refactor DataNode format (#32964)
---
 .../main/java/org/apache/shardingsphere/infra/datanode/DataNode.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/infra/common/src/main/java/org/apache/shardingsphere/infra/datanode/DataNode.java b/infra/common/src/main/java/org/apache/shardingsphere/infra/datanode/DataNode.java
index 008f9fde040..a524dcc9c01 100644
--- a/infra/common/src/main/java/org/apache/shardingsphere/infra/datanode/DataNode.java
+++ b/infra/common/src/main/java/org/apache/shardingsphere/infra/datanode/DataNode.java
@@ -110,7 +110,7 @@ public final class DataNode {
      */
     public String format(final DatabaseType databaseType) {
         DialectDatabaseMetaData dialectDatabaseMetaData = new DatabaseTypeRegistry(databaseType).getDialectDatabaseMetaData();
-        return dialectDatabaseMetaData.getDefaultSchema().isPresent() ? dataSourceName + DELIMITER + schemaName + DELIMITER + tableName : dataSourceName + DELIMITER + tableName;
+        return dialectDatabaseMetaData.getDefaultSchema().isPresent() && schemaName != null ? dataSourceName + DELIMITER + schemaName + DELIMITER + tableName : dataSourceName + DELIMITER + tableName;
     }
     
     @Override