private Set<String> executeDeallocate(String statementName, String sqlString, Session session)
{
TransactionManager transactionManager = createTestTransactionManager();
AccessControl accessControl = new AccessControlManager(transactionManager);
QueryStateMachine stateMachine = QueryStateMachine.begin(
sqlString,
session,
URI.create("fake://uri"),
new ResourceGroupId("test"),
false,
transactionManager,
accessControl,
executor,
metadata,
WarningCollector.NOOP);
Deallocate deallocate = new Deallocate(new Identifier(statementName));
new DeallocateTask().execute(deallocate, transactionManager, metadata, new AllowAllAccessControl(), stateMachine, emptyList());
return stateMachine.getDeallocatedPreparedStatements();
}
}