use of io.trino.testing.LocalQueryRunner in project trino by trinodb.
the class TestLocalQueries method createLocalQueryRunner.
public static LocalQueryRunner createLocalQueryRunner() {
Session defaultSession = testSessionBuilder().setCatalog("local").setSchema(TINY_SCHEMA_NAME).setSystemProperty(PUSH_PARTIAL_AGGREGATION_THROUGH_JOIN, "true").build();
LocalQueryRunner localQueryRunner = LocalQueryRunner.builder(defaultSession).build();
// add the tpch catalog
// local queries run directly against the generator
localQueryRunner.createCatalog(defaultSession.getCatalog().get(), new TpchConnectorFactory(1), ImmutableMap.of());
localQueryRunner.addFunctions(CUSTOM_FUNCTIONS);
return localQueryRunner;
}
Aggregations