Skip to content

Commit

Permalink
Fix sonar issue on ShardingRouteEngineFactory (#34172)
Browse files Browse the repository at this point in the history
  • Loading branch information
terrymanu authored Dec 26, 2024
1 parent e49c72f commit e95517c
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public static ShardingRouteEngine newInstance(final ShardingRule rule, final Sha
SQLStatement sqlStatement = sqlStatementContext.getSqlStatement();
if (sqlStatement instanceof DDLStatement) {
return sqlStatementContext instanceof CursorAvailable
? getCursorRouteEngine(rule, database, sqlStatementContext, queryContext.getHintValueContext(), shardingConditions, logicTableNames, props)
? getCursorRouteEngine(rule, sqlStatementContext, queryContext.getHintValueContext(), shardingConditions, logicTableNames, props)
: getDDLRouteEngine(database, sqlStatementContext, logicTableNames);
}
if (sqlStatement instanceof DALStatement) {
Expand All @@ -83,7 +83,7 @@ public static ShardingRouteEngine newInstance(final ShardingRule rule, final Sha
if (sqlStatement instanceof DCLStatement) {
return getDCLRouteEngine(database, sqlStatementContext, logicTableNames);
}
return getDQLRouteEngine(rule, database, sqlStatementContext, queryContext, shardingConditions, logicTableNames, props);
return getDQLRouteEngine(rule, sqlStatementContext, queryContext, shardingConditions, logicTableNames, props);
}

private static ShardingRouteEngine getDDLRouteEngine(final ShardingSphereDatabase database, final SQLStatementContext sqlStatementContext, final Collection<String> logicTableNames) {
Expand All @@ -95,7 +95,7 @@ private static ShardingRouteEngine getDDLRouteEngine(final ShardingSphereDatabas
return new ShardingTableBroadcastRouteEngine(database, sqlStatementContext, logicTableNames);
}

private static ShardingRouteEngine getCursorRouteEngine(final ShardingRule rule, final ShardingSphereDatabase database, final SQLStatementContext sqlStatementContext,
private static ShardingRouteEngine getCursorRouteEngine(final ShardingRule rule, final SQLStatementContext sqlStatementContext,
final HintValueContext hintValueContext, final ShardingConditions shardingConditions, final Collection<String> logicTableNames,
final ConfigurationProperties props) {
boolean allBindingTables = logicTableNames.size() > 1 && rule.isBindingTablesUseShardingColumnsJoin(sqlStatementContext, logicTableNames);
Expand Down Expand Up @@ -128,7 +128,7 @@ private static boolean isDCLForSingleTable(final SQLStatementContext sqlStatemen
return false;
}

private static ShardingRouteEngine getDQLRouteEngine(final ShardingRule rule, final ShardingSphereDatabase database, final SQLStatementContext sqlStatementContext,
private static ShardingRouteEngine getDQLRouteEngine(final ShardingRule rule, final SQLStatementContext sqlStatementContext,
final QueryContext queryContext, final ShardingConditions shardingConditions, final Collection<String> logicTableNames,
final ConfigurationProperties props) {
Collection<String> tableNames = sqlStatementContext instanceof TableAvailable ? ((TableAvailable) sqlStatementContext).getTablesContext().getTableNames() : Collections.emptyList();
Expand Down

0 comments on commit e95517c

Please sign in to comment.