Skip to content

Commit

Permalink
Refactor ShowStorageUnitExecutor
Browse files Browse the repository at this point in the history
  • Loading branch information
terrymanu committed Oct 8, 2023
1 parent bc63a96 commit 56b41a8
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ public final class ShowSQLFederationRuleExecutor implements MetaDataRequiredQuer
@Override
public Collection<LocalDataQueryResultRow> getRows(final ShardingSphereMetaData metaData, final ShowSQLFederationRuleStatement sqlStatement) {
SQLFederationRuleConfiguration ruleConfig = metaData.getGlobalRuleMetaData().getSingleRule(SQLFederationRule.class).getConfiguration();
return Collections.singleton(new LocalDataQueryResultRow(String.valueOf(ruleConfig.isSqlFederationEnabled()),
null != ruleConfig.getExecutionPlanCache() ? ruleConfig.getExecutionPlanCache().toString() : ""));
String sqlFederationEnabled = String.valueOf(ruleConfig.isSqlFederationEnabled());
String executionPlanCache = null != ruleConfig.getExecutionPlanCache() ? ruleConfig.getExecutionPlanCache().toString() : "";
LocalDataQueryResultRow row = new LocalDataQueryResultRow(sqlFederationEnabled, executionPlanCache);
return Collections.singleton(row);
}

@Override
Expand Down

0 comments on commit 56b41a8

Please sign in to comment.