use of io.prestosql.spi.session.SessionConfigurationContext in project hetu-core by openlookeng.
the class SessionPropertyDefaults method newSessionWithDefaultProperties.
public Session newSessionWithDefaultProperties(Session session, Optional<String> queryType, ResourceGroupId resourceGroupId) {
SessionPropertyConfigurationManager configurationManager = delegate.get();
if (configurationManager == null) {
return session;
}
SessionConfigurationContext context = new SessionConfigurationContext(session.getIdentity().getUser(), session.getSource(), session.getClientTags(), queryType, resourceGroupId);
Map<String, String> systemPropertyOverrides = configurationManager.getSystemSessionProperties(context);
Map<String, Map<String, String>> catalogPropertyOverrides = configurationManager.getCatalogSessionProperties(context);
return session.withDefaultProperties(systemPropertyOverrides, catalogPropertyOverrides);
}
Aggregations