ColumnNaming columnNaming = ColumnNaming.valueOf(properties.getOrDefault(TPCH_COLUMN_NAMING_PROPERTY, ColumnNaming.SIMPLIFIED.name()).toUpperCase()); NodeManager nodeManager = context.getNodeManager();
@Setup public void setup() { String tpch = "tpch"; session = testSessionBuilder() .setCatalog(tpch) .setSchema("sf1") .setSystemProperty("iterative_optimizer_enabled", iterativeOptimizerEnabled) .build(); queryRunner = new LocalQueryRunner(session); queryRunner.createCatalog(tpch, new TpchConnectorFactory(4), ImmutableMap.of(TPCH_COLUMN_NAMING_PROPERTY, ColumnNaming.STANDARD.name())); queries = IntStream.rangeClosed(1, 22) .boxed() .filter(i -> i != 15) // q15 has two queries in it .map(i -> readResource(String.format("/io/airlift/tpch/queries/q%d.sql", i))) .collect(toImmutableList()); }
@BeforeClass public void setup() throws Exception { DistributedQueryRunner runner = TpchQueryRunnerBuilder.builder() // We are not able to calculate stats for PARTIAL aggregations .amendSession(builder -> builder.setSystemProperty(PREFER_PARTIAL_AGGREGATION, "false")) .buildWithoutCatalogs(); runner.createCatalog( "tpch", "tpch", ImmutableMap.of(TPCH_COLUMN_NAMING_PROPERTY, ColumnNaming.STANDARD.name())); statisticsAssertion = new StatisticsAssertion(runner); }
@BeforeClass public void setUp() { Session defaultSession = testSessionBuilder() .setCatalog("tpch") .setSchema(TINY_SCHEMA_NAME) // We are not able to calculate stats for PARTIAL aggregations .setSystemProperty(PREFER_PARTIAL_AGGREGATION, "false") .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); }
public TestTpchCostBasedPlan() { super(() -> { String catalog = "local"; SessionBuilder sessionBuilder = testSessionBuilder() .setCatalog(catalog) .setSchema("sf3000.0") .setSystemProperty("task_concurrency", "1") // these tests don't handle exchanges from local parallel .setSystemProperty(JOIN_REORDERING_STRATEGY, JoinReorderingStrategy.AUTOMATIC.name()) .setSystemProperty(JOIN_DISTRIBUTION_TYPE, JoinDistributionType.AUTOMATIC.name()); LocalQueryRunner queryRunner = LocalQueryRunner.queryRunnerWithFakeNodeCountForStats(sessionBuilder.build(), 8); queryRunner.createCatalog( catalog, new TpchConnectorFactory(1, false, false), ImmutableMap.of(TPCH_COLUMN_NAMING_PROPERTY, ColumnNaming.SIMPLIFIED.name())); return queryRunner; }); }
ColumnNaming columnNaming = ColumnNaming.valueOf(properties.getOrDefault(TPCH_COLUMN_NAMING_PROPERTY, ColumnNaming.SIMPLIFIED.name()).toUpperCase()); NodeManager nodeManager = context.getNodeManager();
@BeforeClass public void setup() throws Exception { DistributedQueryRunner runner = TpchQueryRunnerBuilder.builder() // We are not able to calculate stats for PARTIAL aggregations .amendSession(builder -> builder.setSystemProperty(PREFER_PARTIAL_AGGREGATION, "false")) .buildWithoutCatalogs(); runner.createCatalog( "tpch", "tpch", ImmutableMap.of(TPCH_COLUMN_NAMING_PROPERTY, ColumnNaming.STANDARD.name())); statisticsAssertion = new StatisticsAssertion(runner); }
@BeforeClass public void setUp() { Session defaultSession = testSessionBuilder() .setCatalog("tpch") .setSchema(TINY_SCHEMA_NAME) // We are not able to calculate stats for PARTIAL aggregations .setSystemProperty(PREFER_PARTIAL_AGGREGATION, "false") .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); }