@Override
    public void execute(final ConnectionSession connectionSession) {
        VariableAssignSegment variableAssignSegment = setStatement.getVariableAssigns().iterator().next();
        String variableName = variableAssignSegment.getVariable().getVariable().toLowerCase();
        String assignValue = variableAssignSegment.getAssignValue();
        new CharsetSetExecutor(databaseType, connectionSession).set(variableName, assignValue);
        new SessionVariableRecordExecutor(databaseType, connectionSession).recordVariable(variableName, assignValue);
    }
@Test
    void assertExecute() {
        VariableAssignSegment variableAssignSegment = new VariableAssignSegment();
        VariableSegment variable = new VariableSegment(0, 0, "key");
        variableAssignSegment.setVariable(variable);
        variableAssignSegment.setAssignValue("value");
        PostgreSQLSetStatement setStatement = new PostgreSQLSetStatement();
        setStatement.getVariableAssigns().add(variableAssignSegment);
        PostgreSQLSetVariableAdminExecutor executor = new PostgreSQLSetVariableAdminExecutor(setStatement);
        ConnectionSession connectionSession = mock(ConnectionSession.class);
        RequiredSessionVariableRecorder requiredSessionVariableRecorder = mock(RequiredSessionVariableRecorder.class);
        when(connectionSession.getRequiredSessionVariableRecorder()).thenReturn(requiredSessionVariableRecorder);
        try (MockedStatic<DatabaseTypedSPILoader> databaseTypedSPILoader = mockStatic(DatabaseTypedSPILoader.class)) {
            ReplayedSessionVariableProvider replayedSessionVariableProvider = mock(ReplayedSessionVariableProvider.class);
            when(replayedSessionVariableProvider.isNeedToReplay("key")).thenReturn(true);
            databaseTypedSPILoader.when(() -> DatabaseTypedSPILoader.findService(ReplayedSessionVariableProvider.class, databaseType)).thenReturn(Optional.of(replayedSessionVariableProvider));
            executor.execute(connectionSession);
            verify(requiredSessionVariableRecorder).setVariable("key", "value");
        }
    }