Search in sources :

Example 1 with JOIN_MAX_BROADCAST_TABLE_SIZE

use of com.facebook.presto.SystemSessionProperties.JOIN_MAX_BROADCAST_TABLE_SIZE in project presto by prestodb.

the class TestDetermineJoinDistributionType method testChoosesLeftWhenCriteriaEmpty.

@Test
public void testChoosesLeftWhenCriteriaEmpty() {
    int aRows = 1_000__00;
    int bRows = 1_0;
    assertDetermineJoinDistributionType(new CostComparator(75, 10, 15)).setSystemProperty(JOIN_DISTRIBUTION_TYPE, JoinDistributionType.AUTOMATIC.name()).setSystemProperty(JOIN_MAX_BROADCAST_TABLE_SIZE, "1PB").overrideStats("valuesA", PlanNodeStatsEstimate.builder().setOutputRowCount(aRows).addVariableStatistics(ImmutableMap.of(new VariableReferenceExpression(Optional.empty(), "A1", BIGINT), new VariableStatsEstimate(0, 100, 0, 640000, 100))).build()).overrideStats("valuesB", PlanNodeStatsEstimate.builder().setOutputRowCount(bRows).addVariableStatistics(ImmutableMap.of(new VariableReferenceExpression(Optional.empty(), "B1", BIGINT), new VariableStatsEstimate(0, 100, 0, 640000, 100))).build()).on(p -> p.join(RIGHT, p.values(new PlanNodeId("valuesA"), aRows, p.variable("A1", BIGINT)), p.values(new PlanNodeId("valuesB"), bRows, p.variable("B1", BIGINT)), ImmutableList.of(), ImmutableList.of(p.variable("A1", BIGINT), p.variable("B1", BIGINT)), Optional.empty())).matches(join(LEFT, ImmutableList.of(), Optional.empty(), Optional.of(REPLICATED), values(ImmutableMap.of("B1", 0)), values(ImmutableMap.of("A1", 0))));
}
Also used : CostComparator(com.facebook.presto.cost.CostComparator) Type(com.facebook.presto.sql.planner.plan.JoinNode.Type) PlanNodeId(com.facebook.presto.spi.plan.PlanNodeId) PlanBuilder.castToRowExpression(com.facebook.presto.sql.planner.iterative.rule.test.PlanBuilder.castToRowExpression) VariableReferenceExpression(com.facebook.presto.spi.relation.VariableReferenceExpression) Test(org.testng.annotations.Test) FULL(com.facebook.presto.sql.planner.plan.JoinNode.Type.FULL) PlanMatchPattern.join(com.facebook.presto.sql.planner.assertions.PlanMatchPattern.join) JoinDistributionType(com.facebook.presto.sql.analyzer.FeaturesConfig.JoinDistributionType) ImmutableList(com.google.common.collect.ImmutableList) JOIN_MAX_BROADCAST_TABLE_SIZE(com.facebook.presto.SystemSessionProperties.JOIN_MAX_BROADCAST_TABLE_SIZE) PlanMatchPattern.equiJoinClause(com.facebook.presto.sql.planner.assertions.PlanMatchPattern.equiJoinClause) PlanMatchPattern.enforceSingleRow(com.facebook.presto.sql.planner.assertions.PlanMatchPattern.enforceSingleRow) RuleAssert(com.facebook.presto.sql.planner.iterative.rule.test.RuleAssert) TaskCountEstimator(com.facebook.presto.cost.TaskCountEstimator) DistributionType(com.facebook.presto.sql.planner.plan.JoinNode.DistributionType) JoinNode(com.facebook.presto.sql.planner.plan.JoinNode) AfterClass(org.testng.annotations.AfterClass) BIGINT(com.facebook.presto.common.type.BigintType.BIGINT) PlanNodeStatsEstimate(com.facebook.presto.cost.PlanNodeStatsEstimate) ImmutableMap(com.google.common.collect.ImmutableMap) BeforeClass(org.testng.annotations.BeforeClass) JOIN_DISTRIBUTION_TYPE(com.facebook.presto.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE) RIGHT(com.facebook.presto.sql.planner.plan.JoinNode.Type.RIGHT) PlanBuilder.constantExpressions(com.facebook.presto.sql.planner.iterative.rule.test.PlanBuilder.constantExpressions) REPLICATED(com.facebook.presto.sql.planner.plan.JoinNode.DistributionType.REPLICATED) LEFT(com.facebook.presto.sql.planner.plan.JoinNode.Type.LEFT) CostComparator(com.facebook.presto.cost.CostComparator) Optional(java.util.Optional) PlanMatchPattern.values(com.facebook.presto.sql.planner.assertions.PlanMatchPattern.values) PARTITIONED(com.facebook.presto.sql.planner.plan.JoinNode.DistributionType.PARTITIONED) VariableStatsEstimate(com.facebook.presto.cost.VariableStatsEstimate) RuleTester(com.facebook.presto.sql.planner.iterative.rule.test.RuleTester) INNER(com.facebook.presto.sql.planner.plan.JoinNode.Type.INNER) PlanNodeId(com.facebook.presto.spi.plan.PlanNodeId) VariableReferenceExpression(com.facebook.presto.spi.relation.VariableReferenceExpression) VariableStatsEstimate(com.facebook.presto.cost.VariableStatsEstimate) Test(org.testng.annotations.Test)

Example 2 with JOIN_MAX_BROADCAST_TABLE_SIZE

use of com.facebook.presto.SystemSessionProperties.JOIN_MAX_BROADCAST_TABLE_SIZE in project presto by prestodb.

the class TestDetermineSemiJoinDistributionType method testReplicatesWhenNotRestricted.

@Test
public void testReplicatesWhenNotRestricted() {
    int aRows = 10_000;
    int bRows = 10;
    PlanNodeStatsEstimate probeSideStatsEstimate = PlanNodeStatsEstimate.builder().setOutputRowCount(aRows).addVariableStatistics(ImmutableMap.of(new VariableReferenceExpression(Optional.empty(), "A1", BIGINT), new VariableStatsEstimate(0, 100, 0, 640000, 10))).build();
    PlanNodeStatsEstimate buildSideStatsEstimate = PlanNodeStatsEstimate.builder().setOutputRowCount(bRows).addVariableStatistics(ImmutableMap.of(new VariableReferenceExpression(Optional.empty(), "B1", BIGINT), new VariableStatsEstimate(0, 100, 0, 640000, 10))).build();
    // B table is small enough to be replicated in AUTOMATIC_RESTRICTED mode
    assertDetermineSemiJoinDistributionType().setSystemProperty(JOIN_DISTRIBUTION_TYPE, JoinDistributionType.AUTOMATIC.name()).setSystemProperty(JOIN_MAX_BROADCAST_TABLE_SIZE, "100MB").overrideStats("valuesA", probeSideStatsEstimate).overrideStats("valuesB", buildSideStatsEstimate).on(p -> p.semiJoin(p.values(new PlanNodeId("valuesA"), aRows, p.variable("A1", BIGINT)), p.values(new PlanNodeId("valuesB"), bRows, p.variable("B1", BIGINT)), p.variable("A1"), p.variable("B1"), p.variable("output"), Optional.empty(), Optional.empty(), Optional.empty())).matches(semiJoin("A1", "B1", "output", Optional.of(REPLICATED), values(ImmutableMap.of("A1", 0)), values(ImmutableMap.of("B1", 0))));
    probeSideStatsEstimate = PlanNodeStatsEstimate.builder().setOutputRowCount(aRows).addVariableStatistics(ImmutableMap.of(new VariableReferenceExpression(Optional.empty(), "A1", BIGINT), new VariableStatsEstimate(0, 100, 0, 640000d * 10000, 10))).build();
    buildSideStatsEstimate = PlanNodeStatsEstimate.builder().setOutputRowCount(bRows).addVariableStatistics(ImmutableMap.of(new VariableReferenceExpression(Optional.empty(), "B1", BIGINT), new VariableStatsEstimate(0, 100, 0, 640000d * 10000, 10))).build();
    // B table exceeds AUTOMATIC_RESTRICTED limit therefore it is partitioned
    assertDetermineSemiJoinDistributionType().setSystemProperty(JOIN_DISTRIBUTION_TYPE, JoinDistributionType.AUTOMATIC.name()).setSystemProperty(JOIN_MAX_BROADCAST_TABLE_SIZE, "100MB").overrideStats("valuesA", probeSideStatsEstimate).overrideStats("valuesB", buildSideStatsEstimate).on(p -> p.semiJoin(p.values(new PlanNodeId("valuesA"), aRows, p.variable("A1", BIGINT)), p.values(new PlanNodeId("valuesB"), bRows, p.variable("B1", BIGINT)), p.variable("A1"), p.variable("B1"), p.variable("output"), Optional.empty(), Optional.empty(), Optional.empty())).matches(semiJoin("A1", "B1", "output", Optional.of(PARTITIONED), values(ImmutableMap.of("A1", 0)), values(ImmutableMap.of("B1", 0))));
}
Also used : PlanNodeId(com.facebook.presto.spi.plan.PlanNodeId) AfterClass(org.testng.annotations.AfterClass) BIGINT(com.facebook.presto.common.type.BigintType.BIGINT) PlanNodeStatsEstimate(com.facebook.presto.cost.PlanNodeStatsEstimate) ImmutableMap(com.google.common.collect.ImmutableMap) PlanMatchPattern.semiJoin(com.facebook.presto.sql.planner.assertions.PlanMatchPattern.semiJoin) BeforeClass(org.testng.annotations.BeforeClass) VariableReferenceExpression(com.facebook.presto.spi.relation.VariableReferenceExpression) Test(org.testng.annotations.Test) JOIN_DISTRIBUTION_TYPE(com.facebook.presto.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE) PARTITIONED(com.facebook.presto.sql.planner.plan.SemiJoinNode.DistributionType.PARTITIONED) PlanBuilder.constantExpressions(com.facebook.presto.sql.planner.iterative.rule.test.PlanBuilder.constantExpressions) REPLICATED(com.facebook.presto.sql.planner.plan.SemiJoinNode.DistributionType.REPLICATED) JoinDistributionType(com.facebook.presto.sql.analyzer.FeaturesConfig.JoinDistributionType) ImmutableList(com.google.common.collect.ImmutableList) JOIN_MAX_BROADCAST_TABLE_SIZE(com.facebook.presto.SystemSessionProperties.JOIN_MAX_BROADCAST_TABLE_SIZE) CostComparator(com.facebook.presto.cost.CostComparator) Optional(java.util.Optional) PlanMatchPattern.values(com.facebook.presto.sql.planner.assertions.PlanMatchPattern.values) VariableStatsEstimate(com.facebook.presto.cost.VariableStatsEstimate) RuleAssert(com.facebook.presto.sql.planner.iterative.rule.test.RuleAssert) TaskCountEstimator(com.facebook.presto.cost.TaskCountEstimator) RuleTester(com.facebook.presto.sql.planner.iterative.rule.test.RuleTester) PlanNodeId(com.facebook.presto.spi.plan.PlanNodeId) PlanNodeStatsEstimate(com.facebook.presto.cost.PlanNodeStatsEstimate) VariableReferenceExpression(com.facebook.presto.spi.relation.VariableReferenceExpression) VariableStatsEstimate(com.facebook.presto.cost.VariableStatsEstimate) Test(org.testng.annotations.Test)

Example 3 with JOIN_MAX_BROADCAST_TABLE_SIZE

use of com.facebook.presto.SystemSessionProperties.JOIN_MAX_BROADCAST_TABLE_SIZE in project presto by prestodb.

the class TestDetermineSemiJoinDistributionType method testReplicatesWhenRequiredBySession.

@Test
public void testReplicatesWhenRequiredBySession() {
    int aRows = 10_000;
    int bRows = 10_000;
    assertDetermineSemiJoinDistributionType().setSystemProperty(JOIN_DISTRIBUTION_TYPE, JoinDistributionType.BROADCAST.name()).setSystemProperty(JOIN_MAX_BROADCAST_TABLE_SIZE, "1B").overrideStats("valuesA", PlanNodeStatsEstimate.builder().setOutputRowCount(aRows).addVariableStatistics(ImmutableMap.of(new VariableReferenceExpression(Optional.empty(), "A1", BIGINT), VariableStatsEstimate.unknown())).build()).overrideStats("valuesB", PlanNodeStatsEstimate.builder().setOutputRowCount(bRows).addVariableStatistics(ImmutableMap.of(new VariableReferenceExpression(Optional.empty(), "B1", BIGINT), VariableStatsEstimate.unknown())).build()).on(p -> p.semiJoin(p.values(new PlanNodeId("valuesA"), aRows, p.variable("A1", BIGINT)), p.values(new PlanNodeId("valuesB"), bRows, p.variable("B1", BIGINT)), p.variable("A1"), p.variable("B1"), p.variable("output"), Optional.empty(), Optional.empty(), Optional.empty())).matches(semiJoin("A1", "B1", "output", Optional.of(REPLICATED), values(ImmutableMap.of("A1", 0)), values(ImmutableMap.of("B1", 0))));
}
Also used : PlanNodeId(com.facebook.presto.spi.plan.PlanNodeId) AfterClass(org.testng.annotations.AfterClass) BIGINT(com.facebook.presto.common.type.BigintType.BIGINT) PlanNodeStatsEstimate(com.facebook.presto.cost.PlanNodeStatsEstimate) ImmutableMap(com.google.common.collect.ImmutableMap) PlanMatchPattern.semiJoin(com.facebook.presto.sql.planner.assertions.PlanMatchPattern.semiJoin) BeforeClass(org.testng.annotations.BeforeClass) VariableReferenceExpression(com.facebook.presto.spi.relation.VariableReferenceExpression) Test(org.testng.annotations.Test) JOIN_DISTRIBUTION_TYPE(com.facebook.presto.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE) PARTITIONED(com.facebook.presto.sql.planner.plan.SemiJoinNode.DistributionType.PARTITIONED) PlanBuilder.constantExpressions(com.facebook.presto.sql.planner.iterative.rule.test.PlanBuilder.constantExpressions) REPLICATED(com.facebook.presto.sql.planner.plan.SemiJoinNode.DistributionType.REPLICATED) JoinDistributionType(com.facebook.presto.sql.analyzer.FeaturesConfig.JoinDistributionType) ImmutableList(com.google.common.collect.ImmutableList) JOIN_MAX_BROADCAST_TABLE_SIZE(com.facebook.presto.SystemSessionProperties.JOIN_MAX_BROADCAST_TABLE_SIZE) CostComparator(com.facebook.presto.cost.CostComparator) Optional(java.util.Optional) PlanMatchPattern.values(com.facebook.presto.sql.planner.assertions.PlanMatchPattern.values) VariableStatsEstimate(com.facebook.presto.cost.VariableStatsEstimate) RuleAssert(com.facebook.presto.sql.planner.iterative.rule.test.RuleAssert) TaskCountEstimator(com.facebook.presto.cost.TaskCountEstimator) RuleTester(com.facebook.presto.sql.planner.iterative.rule.test.RuleTester) PlanNodeId(com.facebook.presto.spi.plan.PlanNodeId) VariableReferenceExpression(com.facebook.presto.spi.relation.VariableReferenceExpression) Test(org.testng.annotations.Test)

Example 4 with JOIN_MAX_BROADCAST_TABLE_SIZE

use of com.facebook.presto.SystemSessionProperties.JOIN_MAX_BROADCAST_TABLE_SIZE in project presto by prestodb.

the class TestDetermineJoinDistributionType method testChoosesRightWhenFallsBackToSyntactic.

@Test
public void testChoosesRightWhenFallsBackToSyntactic() {
    int aRows = 1_000__00;
    int bRows = 1_0;
    assertDetermineJoinDistributionType(new CostComparator(75, 10, 15)).setSystemProperty(JOIN_DISTRIBUTION_TYPE, JoinDistributionType.AUTOMATIC.name()).setSystemProperty(JOIN_MAX_BROADCAST_TABLE_SIZE, "100MB").overrideStats("valuesA", PlanNodeStatsEstimate.builder().setOutputRowCount(aRows).addVariableStatistics(ImmutableMap.of(new VariableReferenceExpression(Optional.empty(), "A1", BIGINT), new VariableStatsEstimate(0, 100, 0, 640000, 100))).build()).overrideStats("valuesB", PlanNodeStatsEstimate.builder().setOutputRowCount(bRows).addVariableStatistics(ImmutableMap.of(new VariableReferenceExpression(Optional.empty(), "B1", BIGINT), new VariableStatsEstimate(0, 100, 0, 640000, 100))).build()).on(p -> p.join(RIGHT, p.values(new PlanNodeId("valuesA"), aRows, p.variable("A1", BIGINT)), p.values(new PlanNodeId("valuesB"), bRows, p.variable("B1", BIGINT)), ImmutableList.of(), ImmutableList.of(p.variable("A1", BIGINT), p.variable("B1", BIGINT)), Optional.empty())).matches(join(RIGHT, ImmutableList.of(), Optional.empty(), Optional.of(PARTITIONED), values(ImmutableMap.of("B1", 0)), values(ImmutableMap.of("A1", 0))));
}
Also used : CostComparator(com.facebook.presto.cost.CostComparator) Type(com.facebook.presto.sql.planner.plan.JoinNode.Type) PlanNodeId(com.facebook.presto.spi.plan.PlanNodeId) PlanBuilder.castToRowExpression(com.facebook.presto.sql.planner.iterative.rule.test.PlanBuilder.castToRowExpression) VariableReferenceExpression(com.facebook.presto.spi.relation.VariableReferenceExpression) Test(org.testng.annotations.Test) FULL(com.facebook.presto.sql.planner.plan.JoinNode.Type.FULL) PlanMatchPattern.join(com.facebook.presto.sql.planner.assertions.PlanMatchPattern.join) JoinDistributionType(com.facebook.presto.sql.analyzer.FeaturesConfig.JoinDistributionType) ImmutableList(com.google.common.collect.ImmutableList) JOIN_MAX_BROADCAST_TABLE_SIZE(com.facebook.presto.SystemSessionProperties.JOIN_MAX_BROADCAST_TABLE_SIZE) PlanMatchPattern.equiJoinClause(com.facebook.presto.sql.planner.assertions.PlanMatchPattern.equiJoinClause) PlanMatchPattern.enforceSingleRow(com.facebook.presto.sql.planner.assertions.PlanMatchPattern.enforceSingleRow) RuleAssert(com.facebook.presto.sql.planner.iterative.rule.test.RuleAssert) TaskCountEstimator(com.facebook.presto.cost.TaskCountEstimator) DistributionType(com.facebook.presto.sql.planner.plan.JoinNode.DistributionType) JoinNode(com.facebook.presto.sql.planner.plan.JoinNode) AfterClass(org.testng.annotations.AfterClass) BIGINT(com.facebook.presto.common.type.BigintType.BIGINT) PlanNodeStatsEstimate(com.facebook.presto.cost.PlanNodeStatsEstimate) ImmutableMap(com.google.common.collect.ImmutableMap) BeforeClass(org.testng.annotations.BeforeClass) JOIN_DISTRIBUTION_TYPE(com.facebook.presto.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE) RIGHT(com.facebook.presto.sql.planner.plan.JoinNode.Type.RIGHT) PlanBuilder.constantExpressions(com.facebook.presto.sql.planner.iterative.rule.test.PlanBuilder.constantExpressions) REPLICATED(com.facebook.presto.sql.planner.plan.JoinNode.DistributionType.REPLICATED) LEFT(com.facebook.presto.sql.planner.plan.JoinNode.Type.LEFT) CostComparator(com.facebook.presto.cost.CostComparator) Optional(java.util.Optional) PlanMatchPattern.values(com.facebook.presto.sql.planner.assertions.PlanMatchPattern.values) PARTITIONED(com.facebook.presto.sql.planner.plan.JoinNode.DistributionType.PARTITIONED) VariableStatsEstimate(com.facebook.presto.cost.VariableStatsEstimate) RuleTester(com.facebook.presto.sql.planner.iterative.rule.test.RuleTester) INNER(com.facebook.presto.sql.planner.plan.JoinNode.Type.INNER) PlanNodeId(com.facebook.presto.spi.plan.PlanNodeId) VariableReferenceExpression(com.facebook.presto.spi.relation.VariableReferenceExpression) VariableStatsEstimate(com.facebook.presto.cost.VariableStatsEstimate) Test(org.testng.annotations.Test)

Example 5 with JOIN_MAX_BROADCAST_TABLE_SIZE

use of com.facebook.presto.SystemSessionProperties.JOIN_MAX_BROADCAST_TABLE_SIZE in project presto by prestodb.

the class TestDetermineJoinDistributionType method testReplicatesWhenNotRestricted.

@Test
public void testReplicatesWhenNotRestricted() {
    int aRows = 10_000;
    int bRows = 10;
    PlanNodeStatsEstimate probeSideStatsEstimate = PlanNodeStatsEstimate.builder().setOutputRowCount(aRows).addVariableStatistics(ImmutableMap.of(new VariableReferenceExpression(Optional.empty(), "A1", BIGINT), new VariableStatsEstimate(0, 100, 0, 640000, 10))).build();
    PlanNodeStatsEstimate buildSideStatsEstimate = PlanNodeStatsEstimate.builder().setOutputRowCount(bRows).addVariableStatistics(ImmutableMap.of(new VariableReferenceExpression(Optional.empty(), "B1", BIGINT), new VariableStatsEstimate(0, 100, 0, 640000, 10))).build();
    // B table is small enough to be replicated in AUTOMATIC_RESTRICTED mode
    assertDetermineJoinDistributionType().setSystemProperty(JOIN_DISTRIBUTION_TYPE, JoinDistributionType.AUTOMATIC.name()).setSystemProperty(JOIN_MAX_BROADCAST_TABLE_SIZE, "100MB").overrideStats("valuesA", probeSideStatsEstimate).overrideStats("valuesB", buildSideStatsEstimate).on(p -> p.join(INNER, p.values(new PlanNodeId("valuesA"), aRows, p.variable("A1", BIGINT)), p.values(new PlanNodeId("valuesB"), bRows, p.variable("B1", BIGINT)), ImmutableList.of(new JoinNode.EquiJoinClause(p.variable("A1", BIGINT), p.variable("B1", BIGINT))), ImmutableList.of(p.variable("A1", BIGINT), p.variable("B1", BIGINT)), Optional.empty())).matches(join(INNER, ImmutableList.of(equiJoinClause("A1", "B1")), Optional.empty(), Optional.of(REPLICATED), values(ImmutableMap.of("A1", 0)), values(ImmutableMap.of("B1", 0))));
    probeSideStatsEstimate = PlanNodeStatsEstimate.builder().setOutputRowCount(aRows).addVariableStatistics(ImmutableMap.of(new VariableReferenceExpression(Optional.empty(), "A1", BIGINT), new VariableStatsEstimate(0, 100, 0, 640000d * 10000, 10))).build();
    buildSideStatsEstimate = PlanNodeStatsEstimate.builder().setOutputRowCount(bRows).addVariableStatistics(ImmutableMap.of(new VariableReferenceExpression(Optional.empty(), "B1", BIGINT), new VariableStatsEstimate(0, 100, 0, 640000d * 10000, 10))).build();
    // B table exceeds AUTOMATIC_RESTRICTED limit therefore it is partitioned
    assertDetermineJoinDistributionType().setSystemProperty(JOIN_DISTRIBUTION_TYPE, JoinDistributionType.AUTOMATIC.name()).setSystemProperty(JOIN_MAX_BROADCAST_TABLE_SIZE, "100MB").overrideStats("valuesA", probeSideStatsEstimate).overrideStats("valuesB", buildSideStatsEstimate).on(p -> p.join(INNER, p.values(new PlanNodeId("valuesA"), aRows, p.variable("A1", BIGINT)), p.values(new PlanNodeId("valuesB"), bRows, p.variable("B1", BIGINT)), ImmutableList.of(new JoinNode.EquiJoinClause(p.variable("A1", BIGINT), p.variable("B1", BIGINT))), ImmutableList.of(p.variable("A1", BIGINT), p.variable("B1", BIGINT)), Optional.empty())).matches(join(INNER, ImmutableList.of(equiJoinClause("A1", "B1")), Optional.empty(), Optional.of(PARTITIONED), values(ImmutableMap.of("A1", 0)), values(ImmutableMap.of("B1", 0))));
}
Also used : Type(com.facebook.presto.sql.planner.plan.JoinNode.Type) PlanNodeId(com.facebook.presto.spi.plan.PlanNodeId) PlanBuilder.castToRowExpression(com.facebook.presto.sql.planner.iterative.rule.test.PlanBuilder.castToRowExpression) VariableReferenceExpression(com.facebook.presto.spi.relation.VariableReferenceExpression) Test(org.testng.annotations.Test) FULL(com.facebook.presto.sql.planner.plan.JoinNode.Type.FULL) PlanMatchPattern.join(com.facebook.presto.sql.planner.assertions.PlanMatchPattern.join) JoinDistributionType(com.facebook.presto.sql.analyzer.FeaturesConfig.JoinDistributionType) ImmutableList(com.google.common.collect.ImmutableList) JOIN_MAX_BROADCAST_TABLE_SIZE(com.facebook.presto.SystemSessionProperties.JOIN_MAX_BROADCAST_TABLE_SIZE) PlanMatchPattern.equiJoinClause(com.facebook.presto.sql.planner.assertions.PlanMatchPattern.equiJoinClause) PlanMatchPattern.enforceSingleRow(com.facebook.presto.sql.planner.assertions.PlanMatchPattern.enforceSingleRow) RuleAssert(com.facebook.presto.sql.planner.iterative.rule.test.RuleAssert) TaskCountEstimator(com.facebook.presto.cost.TaskCountEstimator) DistributionType(com.facebook.presto.sql.planner.plan.JoinNode.DistributionType) JoinNode(com.facebook.presto.sql.planner.plan.JoinNode) AfterClass(org.testng.annotations.AfterClass) BIGINT(com.facebook.presto.common.type.BigintType.BIGINT) PlanNodeStatsEstimate(com.facebook.presto.cost.PlanNodeStatsEstimate) ImmutableMap(com.google.common.collect.ImmutableMap) BeforeClass(org.testng.annotations.BeforeClass) JOIN_DISTRIBUTION_TYPE(com.facebook.presto.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE) RIGHT(com.facebook.presto.sql.planner.plan.JoinNode.Type.RIGHT) PlanBuilder.constantExpressions(com.facebook.presto.sql.planner.iterative.rule.test.PlanBuilder.constantExpressions) REPLICATED(com.facebook.presto.sql.planner.plan.JoinNode.DistributionType.REPLICATED) LEFT(com.facebook.presto.sql.planner.plan.JoinNode.Type.LEFT) CostComparator(com.facebook.presto.cost.CostComparator) Optional(java.util.Optional) PlanMatchPattern.values(com.facebook.presto.sql.planner.assertions.PlanMatchPattern.values) PARTITIONED(com.facebook.presto.sql.planner.plan.JoinNode.DistributionType.PARTITIONED) VariableStatsEstimate(com.facebook.presto.cost.VariableStatsEstimate) RuleTester(com.facebook.presto.sql.planner.iterative.rule.test.RuleTester) INNER(com.facebook.presto.sql.planner.plan.JoinNode.Type.INNER) PlanNodeId(com.facebook.presto.spi.plan.PlanNodeId) PlanNodeStatsEstimate(com.facebook.presto.cost.PlanNodeStatsEstimate) VariableReferenceExpression(com.facebook.presto.spi.relation.VariableReferenceExpression) VariableStatsEstimate(com.facebook.presto.cost.VariableStatsEstimate) Test(org.testng.annotations.Test)

Aggregations

JOIN_DISTRIBUTION_TYPE (com.facebook.presto.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE)7 JOIN_MAX_BROADCAST_TABLE_SIZE (com.facebook.presto.SystemSessionProperties.JOIN_MAX_BROADCAST_TABLE_SIZE)7 BIGINT (com.facebook.presto.common.type.BigintType.BIGINT)7 CostComparator (com.facebook.presto.cost.CostComparator)7 PlanNodeStatsEstimate (com.facebook.presto.cost.PlanNodeStatsEstimate)7 VariableStatsEstimate (com.facebook.presto.cost.VariableStatsEstimate)7 PlanNodeId (com.facebook.presto.spi.plan.PlanNodeId)7 VariableReferenceExpression (com.facebook.presto.spi.relation.VariableReferenceExpression)7 JoinDistributionType (com.facebook.presto.sql.analyzer.FeaturesConfig.JoinDistributionType)7 PlanMatchPattern.values (com.facebook.presto.sql.planner.assertions.PlanMatchPattern.values)7 RuleAssert (com.facebook.presto.sql.planner.iterative.rule.test.RuleAssert)7 RuleTester (com.facebook.presto.sql.planner.iterative.rule.test.RuleTester)7 ImmutableList (com.google.common.collect.ImmutableList)7 ImmutableMap (com.google.common.collect.ImmutableMap)7 Optional (java.util.Optional)7 AfterClass (org.testng.annotations.AfterClass)7 BeforeClass (org.testng.annotations.BeforeClass)7 Test (org.testng.annotations.Test)7 TaskCountEstimator (com.facebook.presto.cost.TaskCountEstimator)5 PlanMatchPattern.equiJoinClause (com.facebook.presto.sql.planner.assertions.PlanMatchPattern.equiJoinClause)5