public static DistributedQueryRunner createJdbcQueryRunner(Iterable<TpchTable<?>> tables) throws Exception { DistributedQueryRunner queryRunner = null; try { queryRunner = new DistributedQueryRunner(createSession(), 3); queryRunner.installPlugin(new TpchPlugin()); queryRunner.createCatalog("tpch", "tpch"); Map<String, String> properties = TestingH2JdbcModule.createProperties(); createSchema(properties, "tpch"); queryRunner.installPlugin(new JdbcPlugin("base-jdbc", new TestingH2JdbcModule())); queryRunner.createCatalog("jdbc", "base-jdbc", properties); copyTpchTables(queryRunner, "tpch", TINY_SCHEMA_NAME, createSession(), tables); return queryRunner; } catch (Throwable e) { closeAllSuppress(e, queryRunner); throw e; } }
public static DistributedQueryRunner createJdbcQueryRunner(Iterable<TpchTable<?>> tables) throws Exception { DistributedQueryRunner queryRunner = null; try { queryRunner = new DistributedQueryRunner(createSession(), 3); queryRunner.installPlugin(new TpchPlugin()); queryRunner.createCatalog("tpch", "tpch"); Map<String, String> properties = TestingH2JdbcModule.createProperties(); createSchema(properties, "tpch"); queryRunner.installPlugin(new JdbcPlugin("base-jdbc", new TestingH2JdbcModule())); queryRunner.createCatalog("jdbc", "base-jdbc", properties); copyTpchTables(queryRunner, "tpch", TINY_SCHEMA_NAME, createSession(), tables); return queryRunner; } catch (Throwable e) { closeAllSuppress(e, queryRunner); throw e; } }