use of io.prestosql.security.AccessControl in project hetu-core by openlookeng.
the class TestQueryStateMachine method createQueryStateMachineWithTicker.
private QueryStateMachine createQueryStateMachineWithTicker(Ticker ticker) {
Metadata metadata = createTestMetadataManager();
TransactionManager transactionManager = createTestTransactionManager();
AccessControl accessControl = new AccessControlManager(transactionManager);
QueryStateMachine stateMachine = QueryStateMachine.beginWithTicker(QUERY, Optional.empty(), TEST_SESSION, LOCATION, new ResourceGroupId("test"), new NoOpResourceGroupManager(), false, transactionManager, accessControl, executor, ticker, metadata, WarningCollector.NOOP);
stateMachine.setInputs(INPUTS);
stateMachine.setOutput(OUTPUT);
stateMachine.setColumns(OUTPUT_FIELD_NAMES, OUTPUT_FIELD_TYPES);
stateMachine.setUpdateType(UPDATE_TYPE);
stateMachine.setMemoryPool(MEMORY_POOL);
for (Entry<String, String> entry : SET_SESSION_PROPERTIES.entrySet()) {
stateMachine.addSetSessionProperties(entry.getKey(), entry.getValue());
}
RESET_SESSION_PROPERTIES.forEach(stateMachine::addResetSessionProperties);
return stateMachine;
}
Aggregations