public QueryAssertions(Session session) { runner = new LocalQueryRunner(session); }
@BeforeClass public final void initTestWindowFunction() { queryRunner = new LocalQueryRunner(TEST_SESSION); }
@BeforeClass public void setUp() { runner = new LocalQueryRunner(TEST_SESSION); }
@BeforeClass public void setUp() { runner = new LocalQueryRunner(TEST_SESSION); }
public static LocalQueryRunner queryRunnerWithInitialTransaction(Session defaultSession) { checkArgument(!defaultSession.getTransactionId().isPresent(), "Already in transaction!"); return new LocalQueryRunner(defaultSession, new FeaturesConfig(), new NodeSpillConfig(), true, false); }
@Test(expectedExceptions = RuntimeException.class, expectedExceptionsMessageRegExp = "/ by zero") public void testQuery() { // The other test does not exercise this function during execution (i.e. inside a page processor). // It only verifies constant folding works. try (LocalQueryRunner runner = new LocalQueryRunner(TEST_SESSION)) { runner.execute("select if(x, 78, 0/0) from (values rand() >= 0, rand() < 0) t(x)"); } } }
public static LocalQueryRunner queryRunnerWithFakeNodeCountForStats(Session defaultSession, int nodeCount) { return new LocalQueryRunner(defaultSession, new FeaturesConfig(), new NodeSpillConfig(), false, false, nodeCount); }
@BeforeClass public void setUp() { queryRunner = new LocalQueryRunner(testSessionBuilder().build()); }
public FunctionAssertions(Session session, FeaturesConfig featuresConfig) { this.session = requireNonNull(session, "session is null"); runner = new LocalQueryRunner(session, featuresConfig); metadata = runner.getMetadata(); compiler = runner.getExpressionCompiler(); }
@BeforeClass public void setUp() { queryRunner = new LocalQueryRunner(testSessionBuilder().build()); }
@BeforeClass public void setUp() { runner = new LocalQueryRunner(TEST_SESSION); runner.createCatalog(TEST_SESSION.getCatalog().get(), new TpchConnectorFactory(1), ImmutableMap.of()); }
private static LocalQueryRunner createQueryRunner(Session session) { LocalQueryRunner queryRunner = new LocalQueryRunner(session); queryRunner.createCatalog(session.getCatalog().get(), new TpchConnectorFactory(1), ImmutableMap.of()); return queryRunner; }
@BeforeClass public void setUp() { queryRunner = new LocalQueryRunner(testSessionBuilder() .setCatalog("local") .setSchema("tiny") .build()); queryRunner.createCatalog( queryRunner.getDefaultSession().getCatalog().get(), new TpchConnectorFactory(1), ImmutableMap.of()); }
@BeforeClass public void setUp() { Session defaultSession = testSessionBuilder() .setCatalog("tpcds") .setSchema("sf1") .build(); LocalQueryRunner queryRunner = new LocalQueryRunner(defaultSession); queryRunner.createCatalog("tpcds", new TpcdsConnectorFactory(), emptyMap()); statisticsAssertion = new StatisticsAssertion(queryRunner); }
public TestDictionaryAggregation() { super(() -> { LocalQueryRunner queryRunner = new LocalQueryRunner(testSessionBuilder() .setSystemProperty(DICTIONARY_AGGREGATION, "true") .setSystemProperty(REORDER_JOINS, "false") // no JOIN reordering .build()); queryRunner.createCatalog("tpch", new TpchConnectorFactory(1), ImmutableMap.of()); return queryRunner; }); }
private static QueryRunner createQueryRunner(boolean legacyLogFunction) { return new LocalQueryRunner(testSessionBuilder().build(), new FeaturesConfig().setLegacyLogFunction(legacyLogFunction)); } }
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; }
public TestStatsCalculator() { this.queryRunner = new LocalQueryRunner(testSessionBuilder() .setCatalog("local") .setSchema("tiny") .setSystemProperty("task_concurrency", "1") // these tests don't handle exchanges from local parallel .build()); queryRunner.createCatalog( queryRunner.getDefaultSession().getCatalog().get(), new TpchConnectorFactory(1), ImmutableMap.of()); }
private static QueryRunner createQueryRunner() { return new LocalQueryRunner(testSessionBuilder().build(), new FeaturesConfig().setGroupByUsesEqualTo(true)); } }
@Setup public void setup() { Session session = testSessionBuilder() .setSystemProperty("join_reordering_strategy", joinReorderingStrategy) .setSystemProperty("join_distribution_type", "AUTOMATIC") .setCatalog("tpch") .setSchema("tiny") .build(); queryRunner = new LocalQueryRunner(session); queryRunner.createCatalog("tpch", new TpchConnectorFactory(1), ImmutableMap.of()); }