use of com.facebook.presto.spi.session.SessionConfigurationContext in project presto by prestodb.
the class SessionPropertyDefaults method newSessionWithDefaultProperties.
public Session newSessionWithDefaultProperties(Session session, Optional<String> queryType, Optional<ResourceGroupId> resourceGroupId) {
SessionPropertyConfigurationManager configurationManager = delegate.get();
if (configurationManager == null) {
return session;
}
SessionConfigurationContext context = new SessionConfigurationContext(session.getIdentity().getUser(), session.getSource(), session.getClientTags(), queryType, resourceGroupId, session.getClientInfo());
SystemSessionPropertyConfiguration systemPropertyConfiguration = configurationManager.getSystemSessionProperties(context);
Map<String, Map<String, String>> catalogPropertyOverrides = configurationManager.getCatalogSessionProperties(context);
return session.withDefaultProperties(systemPropertyConfiguration, catalogPropertyOverrides);
}
Aggregations