This is an automated email from the ASF dual-hosted git repository.
zhangliang 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 74e0abb2459 Fix sonar issue on SystemSchemaUtils (#37247)
74e0abb2459 is described below
commit 74e0abb2459f5f51ed38e21fd8e23207102f86dc
Author: Liang Zhang <[email protected]>
AuthorDate: Mon Dec 1 23:03:57 2025 +0800
Fix sonar issue on SystemSchemaUtils (#37247)
---
.../infra/metadata/database/schema/util/SystemSchemaUtils.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/util/SystemSchemaUtils.java
b/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/util/SystemSchemaUtils.java
index 57e101f2080..189374562c9 100644
---
a/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/util/SystemSchemaUtils.java
+++
b/infra/common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/util/SystemSchemaUtils.java
@@ -78,7 +78,6 @@ public final class SystemSchemaUtils {
* @return whether query or not
*/
public static boolean isDriverQuerySystemCatalog(final DatabaseType
databaseType, final Collection<ProjectionSegment> projections) {
- Optional<DialectDriverQuerySystemCatalogOption>
driverQuerySystemCatalogOption = new
DatabaseTypeRegistry(databaseType).getDialectDatabaseMetaData().getDriverQuerySystemCatalogOption();
if (1 != projections.size()) {
return false;
}
@@ -86,6 +85,7 @@ public final class SystemSchemaUtils {
if (!(firstProjection instanceof ExpressionProjectionSegment)) {
return false;
}
+ Optional<DialectDriverQuerySystemCatalogOption>
driverQuerySystemCatalogOption = new
DatabaseTypeRegistry(databaseType).getDialectDatabaseMetaData().getDriverQuerySystemCatalogOption();
return driverQuerySystemCatalogOption.map(optional ->
optional.isSystemCatalogQueryExpressions(((ExpressionProjectionSegment)
firstProjection).getText())).orElse(false);
}
}