@Override
    public Collection<LocalDataQueryResultRow> getRows(final ShowReadwriteSplittingRulesStatement sqlStatement, final ContextManager contextManager) {
        Collection<LocalDataQueryResultRow> result = new LinkedList<>();
        Map<String, Map<String, String>> exportableDataSourceMap = getExportableDataSourceMap(rule);
        ReadwriteSplittingRuleConfiguration ruleConfig = rule.getConfiguration();
        ruleConfig.getDataSourceGroups().forEach(each -> {
            LocalDataQueryResultRow dataItem = buildDataItem(exportableDataSourceMap, each, getLoadBalancers(ruleConfig));
            if (null == sqlStatement.getRuleName() || sqlStatement.getRuleName().equalsIgnoreCase(each.getName())) {
                result.add(dataItem);
            }
        });
        return result;
    }
@Test
    void assertGetRowDataWithSpecifiedRuleName() throws SQLException {
        engine = setUp(new ShowReadwriteSplittingRulesStatement("readwrite_ds", null), createRuleConfiguration());
        engine.executeQuery();
        Collection<LocalDataQueryResultRow> actual = engine.getRows();
        assertThat(actual.size(), is(1));
        Iterator<LocalDataQueryResultRow> iterator = actual.iterator();
        LocalDataQueryResultRow row = iterator.next();
        assertThat(row.getCell(1), is("readwrite_ds"));
        assertThat(row.getCell(2), is("ds_primary"));
        assertThat(row.getCell(3), is("ds_slave_0,ds_slave_1"));
        assertThat(row.getCell(4), is("DYNAMIC"));
        assertThat(row.getCell(5), is("random"));
        assertThat(row.getCell(6), is("{\"read_weight\":\"2:1\"}"));
    }