use of com.facebook.presto.tpch.TpchConnectorFactory in project presto by prestodb.
the class TestSpatialJoinPlanning method createQueryRunner.
private static LocalQueryRunner createQueryRunner() {
LocalQueryRunner queryRunner = new LocalQueryRunner(testSessionBuilder().setCatalog("memory").setSchema("default").build());
queryRunner.installPlugin(new GeoPlugin());
queryRunner.createCatalog("tpch", new TpchConnectorFactory(1), ImmutableMap.of());
queryRunner.createCatalog("memory", new MemoryConnectorFactory(), ImmutableMap.of());
queryRunner.execute(format("CREATE TABLE kdb_tree AS SELECT '%s' AS v", KDB_TREE_JSON));
return queryRunner;
}
use of com.facebook.presto.tpch.TpchConnectorFactory in project presto by prestodb.
the class TestTpchLocalStats method setUp.
@BeforeClass
public void setUp() {
Session defaultSession = testSessionBuilder().setCatalog("tpch").setSchema(TINY_SCHEMA_NAME).setSystemProperty(PREFER_PARTIAL_AGGREGATION, "false").setSystemProperty(PRINT_STATS_FOR_NON_JOIN_QUERY, "true").build();
LocalQueryRunner queryRunner = new LocalQueryRunner(defaultSession);
queryRunner.createCatalog("tpch", new TpchConnectorFactory(1), ImmutableMap.of(TPCH_COLUMN_NAMING_PROPERTY, ColumnNaming.STANDARD.name()));
statisticsAssertion = new StatisticsAssertion(queryRunner);
}
use of com.facebook.presto.tpch.TpchConnectorFactory in project presto by prestodb.
the class TestQueryPlanDeterminism method createQueryRunner.
@Override
protected QueryRunner createQueryRunner() {
Session defaultSession = testSessionBuilder().setCatalog("local").setSchema(TINY_SCHEMA_NAME).build();
LocalQueryRunner localQueryRunner = new LocalQueryRunner(defaultSession);
// add the tpch catalog
// local queries run directly against the generator
localQueryRunner.createCatalog(defaultSession.getCatalog().get(), new TpchConnectorFactory(1), ImmutableMap.of());
localQueryRunner.getMetadata().registerBuiltInFunctions(CUSTOM_FUNCTIONS);
SessionPropertyManager sessionPropertyManager = localQueryRunner.getMetadata().getSessionPropertyManager();
sessionPropertyManager.addSystemSessionProperties(TEST_SYSTEM_PROPERTIES);
sessionPropertyManager.addConnectorSessionProperties(new ConnectorId(TESTING_CATALOG), TEST_CATALOG_PROPERTIES);
return localQueryRunner;
}
use of com.facebook.presto.tpch.TpchConnectorFactory in project presto by prestodb.
the class TestDictionaryAggregation method createQueryRunner.
@Override
protected QueryRunner createQueryRunner() {
LocalQueryRunner queryRunner = new LocalQueryRunner(testSessionBuilder().setSystemProperty(DICTIONARY_AGGREGATION, "true").setSystemProperty(REORDER_JOINS, // no JOIN reordering
"false").build());
queryRunner.createCatalog("tpch", new TpchConnectorFactory(1), ImmutableMap.of());
return queryRunner;
}
use of com.facebook.presto.tpch.TpchConnectorFactory in project presto by prestodb.
the class RaptorBenchmarkQueryRunner method createLocalQueryRunner.
public static LocalQueryRunner createLocalQueryRunner() {
Session session = testSessionBuilder().setCatalog("raptor").setSchema("benchmark").build();
LocalQueryRunner localQueryRunner = new LocalQueryRunner(session);
// add tpch
localQueryRunner.createCatalog("tpch", new TpchConnectorFactory(1), ImmutableMap.of());
// add raptor
ConnectorFactory raptorConnectorFactory = getOnlyElement(new RaptorPlugin().getConnectorFactories());
Map<String, String> config = createRaptorConfig(TPCH_CACHE_DIR);
localQueryRunner.createCatalog("raptor", raptorConnectorFactory, config);
if (!localQueryRunner.tableExists(session, "orders")) {
localQueryRunner.execute("CREATE TABLE orders AS SELECT * FROM tpch.sf1.orders");
}
if (!localQueryRunner.tableExists(session, "lineitem")) {
localQueryRunner.execute("CREATE TABLE lineitem AS SELECT * FROM tpch.sf1.lineitem");
}
return localQueryRunner;
}
Aggregations