@Override
    public void execute(final ConnectionSession connectionSession) {
        String name = showStatement.getName().orElse("").toLowerCase(Locale.ROOT);
        if ("ALL".equalsIgnoreCase(name)) {
            executeShowAll(connectionSession);
            return;
        }
        queryResultMetaData = new RawQueryResultMetaData(Collections.singletonList(new RawQueryResultColumnMetaData("", "", name, Types.VARCHAR, "VARCHAR", -1, 0)));
        VariableRowDataGenerator variableRowDataGenerator = VARIABLE_ROW_DATA_GENERATORS.getOrDefault(name, unused -> new String[]{"", "", ""});
        mergedResult = new LocalDataMergedResult(Collections.singletonList(new LocalDataQueryResultRow(variableRowDataGenerator.getVariable(connectionSession)[1])));
    }
@Test
    void assertExecuteShowAll() throws SQLException {
        ConnectionSession connectionSession = mock(ConnectionSession.class);
        PostgreSQLShowVariableExecutor executor = new PostgreSQLShowVariableExecutor(new PostgreSQLShowStatement("ALL"));
        executor.execute(connectionSession);
        QueryResultMetaData actualMetaData = executor.getQueryResultMetaData();
        assertThat(actualMetaData.getColumnCount(), is(3));
        assertThat(actualMetaData.getColumnLabel(1), is("name"));
        assertThat(actualMetaData.getColumnLabel(2), is("setting"));
        assertThat(actualMetaData.getColumnLabel(3), is("description"));
        MergedResult actualResult = executor.getMergedResult();
        Map<String, String> expected = new LinkedHashMap<>(7, 1F);
        expected.put("application_name", "PostgreSQL");
        expected.put("client_encoding", "UTF8");
        expected.put("integer_datetimes", "on");
        expected.put("TimeZone", "Etc/UTC");
        expected.put("transaction_isolation", "read committed");
        expected.put("transaction_read_only", "off");
        expected.put("server_version", ShardingSphereVersion.VERSION);
        for (Entry<String, String> entry : expected.entrySet()) {
            assertTrue(actualResult.next());
            assertThat(actualResult.getValue(1, String.class), is(entry.getKey()));
            assertThat(actualResult.getValue(2, String.class), is(entry.getValue()));
        }
        assertFalse(actualResult.next());
    }