use of com.facebook.presto.SystemSessionProperties.TASK_CONCURRENCY in project presto by prestodb.
the class TestAddExchangesPlans method assertPlanWithMergePartitionStrategy.
private void assertPlanWithMergePartitionStrategy(String sql, String partitionMergingStrategy, int remoteRepartitionExchangeCount, PlanMatchPattern pattern) {
Session session = Session.builder(this.getQueryRunner().getDefaultSession()).setSystemProperty(AGGREGATION_PARTITIONING_MERGING_STRATEGY, partitionMergingStrategy).setSystemProperty(TASK_CONCURRENCY, "2").build();
BiConsumer<Plan, Integer> validateMultipleRemoteRepartitionExchange = (plan, count) -> assertEquals(searchFrom(plan.getRoot()).where(node -> node instanceof ExchangeNode && ((ExchangeNode) node).getScope() == REMOTE_STREAMING && ((ExchangeNode) node).getType() == REPARTITION).count(), count.intValue());
assertPlanWithSession(sql, session, false, pattern, plan -> validateMultipleRemoteRepartitionExchange.accept(plan, remoteRepartitionExchangeCount));
}
Aggregations