From d04eafd5a1826fbaee965a9163be2ff1d6fa554b Mon Sep 17 00:00:00 2001 From: zhangliang Date: Mon, 23 Sep 2024 23:59:37 +0800 Subject: [PATCH] Refactor DataNode --- .../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 a524dcc9c0159..d88f3db799895 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 @@ private boolean isActualDataNodesIncludedDataSourceInstance(final String actualD */ public String format(final DatabaseType databaseType) { DialectDatabaseMetaData dialectDatabaseMetaData = new DatabaseTypeRegistry(databaseType).getDialectDatabaseMetaData(); - return dialectDatabaseMetaData.getDefaultSchema().isPresent() && schemaName != null ? dataSourceName + DELIMITER + schemaName + DELIMITER + tableName : dataSourceName + DELIMITER + tableName; + return dialectDatabaseMetaData.getDefaultSchema().isPresent() && null != schemaName ? dataSourceName + DELIMITER + schemaName + DELIMITER + tableName : dataSourceName + DELIMITER + tableName; } @Override