use of io.trino.plugin.tpch.TpchConnectorFactory in project trino by trinodb.
the class TestDictionaryAggregation method createQueryRunner.
@Override
protected QueryRunner createQueryRunner() {
LocalQueryRunner queryRunner = LocalQueryRunner.create(testSessionBuilder().setSystemProperty(DICTIONARY_AGGREGATION, "true").setSystemProperty(JOIN_REORDERING_STRATEGY, NONE.toString()).build());
queryRunner.createCatalog("tpch", new TpchConnectorFactory(1), ImmutableMap.of());
return queryRunner;
}
use of io.trino.plugin.tpch.TpchConnectorFactory in project trino by trinodb.
the class TestTablesample method setUp.
@BeforeClass
public void setUp() throws Exception {
queryRunner = LocalQueryRunner.create(TEST_SESSION);
queryRunner.createCatalog("tpch", new TpchConnectorFactory(1), ImmutableMap.of());
assertions = new QueryAssertions(queryRunner);
}
use of io.trino.plugin.tpch.TpchConnectorFactory in project trino by trinodb.
the class TestQueryPlanDeterminism method createQueryRunner.
@Override
protected QueryRunner createQueryRunner() {
Session defaultSession = testSessionBuilder().setCatalog("local").setSchema(TINY_SCHEMA_NAME).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;
}
use of io.trino.plugin.tpch.TpchConnectorFactory in project trino by trinodb.
the class TestAddExchangesPlans method createLocalQueryRunner.
@Override
protected LocalQueryRunner createLocalQueryRunner() {
Session session = testSessionBuilder().setCatalog("tpch").setSchema("tiny").build();
FeaturesConfig featuresConfig = new FeaturesConfig().setSpillerSpillPaths("/tmp/test_spill_path");
LocalQueryRunner queryRunner = LocalQueryRunner.builder(session).withFeaturesConfig(featuresConfig).build();
queryRunner.createCatalog("tpch", new TpchConnectorFactory(1), ImmutableMap.of());
return queryRunner;
}
use of io.trino.plugin.tpch.TpchConnectorFactory in project trino by trinodb.
the class TestMemoryPools method setUp.
private void setUp(Supplier<List<Driver>> driversSupplier) {
checkState(localQueryRunner == null, "Already set up");
Session session = testSessionBuilder().setCatalog("tpch").setSchema("tiny").setSystemProperty("task_default_concurrency", "1").build();
localQueryRunner = LocalQueryRunner.builder(session).withInitialTransaction().build();
// add tpch
localQueryRunner.createCatalog("tpch", new TpchConnectorFactory(1), ImmutableMap.of());
userPool = new MemoryPool(TEN_MEGABYTES);
fakeQueryId = new QueryId("fake");
SpillSpaceTracker spillSpaceTracker = new SpillSpaceTracker(DataSize.of(1, GIGABYTE));
QueryContext queryContext = new QueryContext(new QueryId("query"), TEN_MEGABYTES, userPool, new TestingGcMonitor(), localQueryRunner.getExecutor(), localQueryRunner.getScheduler(), TEN_MEGABYTES, spillSpaceTracker);
taskContext = createTaskContext(queryContext, localQueryRunner.getExecutor(), localQueryRunner.getDefaultSession());
drivers = driversSupplier.get();
}
Aggregations