result = dManager.sendRequest(getName(), involvedClusters, nodes, task, EXECUTION_MODE.RESPONSE);
if (result instanceof Map) {
if (executor instanceof OCommandExecutorSQLDelegate
&& ((OCommandExecutorSQLDelegate) executor).getDelegate() instanceof OCommandExecutorSQLSelect) {
final OCommandExecutorSQLSelect cmd = (OCommandExecutorSQLSelect) ((OCommandExecutorSQLDelegate) executor)
.getDelegate();
if (((Map<String, Object>) result).size() == 1)
// USE THE COLLECTION DIRECTLY
result = ((Map<String, Object>) result).values().iterator().next();
else {
if (cmd.isAnyFunctionAggregates()) {
final Map<String, Object> proj = cmd.getProjections();
final List<Object> list = new ArrayList<Object>();
final ODocument doc = new ODocument();
list.add(doc);