Search in sources :

Example 6 with SessionBuilder

use of io.trino.Session.SessionBuilder in project trino by trinodb.

the class KuduQueryRunnerFactory method createSession.

public static Session createSession(String schema, Map<String, String> kuduSessionProperties) {
    SessionBuilder builder = testSessionBuilder().setCatalog("kudu").setSchema(schema);
    kuduSessionProperties.forEach((k, v) -> builder.setCatalogSessionProperty("kudu", k, v));
    return builder.build();
}
Also used : TestingSession.testSessionBuilder(io.trino.testing.TestingSession.testSessionBuilder) SessionBuilder(io.trino.Session.SessionBuilder)

Aggregations

SessionBuilder (io.trino.Session.SessionBuilder)6 TestingSession.testSessionBuilder (io.trino.testing.TestingSession.testSessionBuilder)5 TpchConnectorFactory (io.trino.plugin.tpch.TpchConnectorFactory)2 LocalQueryRunner (io.trino.testing.LocalQueryRunner)2 Session (io.trino.Session)1 TestingEventListenerPlugin (io.trino.execution.TestEventListenerPlugin.TestingEventListenerPlugin)1 WarningCode (io.trino.spi.WarningCode)1 Identity (io.trino.spi.security.Identity)1 SqlPath (io.trino.sql.SqlPath)1 Map (java.util.Map)1 BeforeMethod (org.testng.annotations.BeforeMethod)1