Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ public void testReplicatesWhenNotRestricted()
.addSymbolStatistics(ImmutableMap.of(new Symbol("B1"), new SymbolStatsEstimate(0, 100, 0, 640000, 10)))
.build();

// B table is small enough to be replicated in AUTOMATIC_RESTRICTED mode
// B table is small enough to be replicated according to JOIN_MAX_BROADCAST_TABLE_SIZE limit
assertDetermineJoinDistributionType()
.setSystemProperty(JOIN_DISTRIBUTION_TYPE, JoinDistributionType.AUTOMATIC.name())
.setSystemProperty(JOIN_MAX_BROADCAST_TABLE_SIZE, "100MB")
Expand Down Expand Up @@ -629,7 +629,7 @@ public void testReplicatesWhenNotRestricted()
.addSymbolStatistics(ImmutableMap.of(new Symbol("B1"), new SymbolStatsEstimate(0, 100, 0, 640000d * 10000, 10)))
.build();

// B table exceeds AUTOMATIC_RESTRICTED limit therefore it is partitioned
// B table exceeds JOIN_MAX_BROADCAST_TABLE_SIZE limit therefore it is partitioned
assertDetermineJoinDistributionType()
.setSystemProperty(JOIN_DISTRIBUTION_TYPE, JoinDistributionType.AUTOMATIC.name())
.setSystemProperty(JOIN_MAX_BROADCAST_TABLE_SIZE, "100MB")
Expand Down Expand Up @@ -663,23 +663,23 @@ public void testReplicatesWhenSourceIsSmall()
int aRows = 10_000;
int bRows = 10;

// output size exceeds AUTOMATIC_RESTRICTED limit
// output size exceeds JOIN_MAX_BROADCAST_TABLE_SIZE limit
PlanNodeStatsEstimate aStatsEstimate = PlanNodeStatsEstimate.builder()
.setOutputRowCount(aRows)
.addSymbolStatistics(ImmutableMap.of(new Symbol("A1"), new SymbolStatsEstimate(0, 100, 0, 640000d * 10000, 10)))
.build();
// output size exceeds AUTOMATIC_RESTRICTED limit
// output size exceeds JOIN_MAX_BROADCAST_TABLE_SIZE limit
PlanNodeStatsEstimate bStatsEstimate = PlanNodeStatsEstimate.builder()
.setOutputRowCount(bRows)
.addSymbolStatistics(ImmutableMap.of(new Symbol("B1"), new SymbolStatsEstimate(0, 100, 0, 640000d * 10000, 10)))
.build();
// output size does not exceed AUTOMATIC_RESTRICTED limit
// output size does not exceed JOIN_MAX_BROADCAST_TABLE_SIZE limit
PlanNodeStatsEstimate bSourceStatsEstimate = PlanNodeStatsEstimate.builder()
.setOutputRowCount(bRows)
.addSymbolStatistics(ImmutableMap.of(new Symbol("B1"), new SymbolStatsEstimate(0, 100, 0, 64, 10)))
.build();

// immediate join sources exceeds AUTOMATIC_RESTRICTED limit but build tables are small
// immediate join sources exceeds JOIN_MAX_BROADCAST_TABLE_SIZE limit but build tables are small
// therefore replicated distribution type is chosen
assertDetermineJoinDistributionType()
.setSystemProperty(JOIN_DISTRIBUTION_TYPE, JoinDistributionType.AUTOMATIC.name())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ public void testReplicatesWhenNotRestricted()
.addSymbolStatistics(ImmutableMap.of(new Symbol("B1"), new SymbolStatsEstimate(0, 100, 0, 640000, 10)))
.build();

// B table is small enough to be replicated in AUTOMATIC_RESTRICTED mode
// B table is small enough to be replicated according to JOIN_MAX_BROADCAST_TABLE_SIZE limit
assertDetermineSemiJoinDistributionType()
.setSystemProperty(JOIN_DISTRIBUTION_TYPE, JoinDistributionType.AUTOMATIC.name())
.setSystemProperty(JOIN_MAX_BROADCAST_TABLE_SIZE, "100MB")
Expand Down Expand Up @@ -275,7 +275,7 @@ public void testReplicatesWhenNotRestricted()
.addSymbolStatistics(ImmutableMap.of(new Symbol("B1"), new SymbolStatsEstimate(0, 100, 0, 640000d * 10000, 10)))
.build();

// B table exceeds AUTOMATIC_RESTRICTED limit therefore it is partitioned
// B table exceeds JOIN_MAX_BROADCAST_TABLE_SIZE limit therefore it is partitioned
assertDetermineSemiJoinDistributionType()
.setSystemProperty(JOIN_DISTRIBUTION_TYPE, JoinDistributionType.AUTOMATIC.name())
.setSystemProperty(JOIN_MAX_BROADCAST_TABLE_SIZE, "100MB")
Expand Down Expand Up @@ -323,7 +323,7 @@ public void testReplicatesWhenSourceIsSmall()
.addSymbolStatistics(ImmutableMap.of(new Symbol("B1"), new SymbolStatsEstimate(0, 100, 0, 64, 10)))
.build();

// build side exceeds AUTOMATIC_RESTRICTED limit but source plan nodes are small
// build side exceeds JOIN_MAX_BROADCAST_TABLE_SIZE limit but source plan nodes are small
// therefore replicated distribution type is chosen
assertDetermineSemiJoinDistributionType()
.setSystemProperty(JOIN_DISTRIBUTION_TYPE, JoinDistributionType.AUTOMATIC.name())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ public void testReplicatesWhenNotRestricted()
.addSymbolStatistics(ImmutableMap.of(new Symbol("B1"), new SymbolStatsEstimate(0, 100, 0, 640000, 10)))
.build();

// B table is small enough to be replicated in AUTOMATIC_RESTRICTED mode
// B table is small enough to be replicated according to JOIN_MAX_BROADCAST_TABLE_SIZE limit
assertReorderJoins()
.setSystemProperty(JOIN_DISTRIBUTION_TYPE, AUTOMATIC.name())
.setSystemProperty(JOIN_MAX_BROADCAST_TABLE_SIZE, "100MB")
Expand Down Expand Up @@ -606,7 +606,7 @@ public void testReplicatesWhenNotRestricted()
.addSymbolStatistics(ImmutableMap.of(new Symbol("B1"), new SymbolStatsEstimate(0, 100, 0, 640000d * 10000, 10)))
.build();

// B table exceeds AUTOMATIC_RESTRICTED limit therefore it is partitioned
// B table exceeds JOIN_MAX_BROADCAST_TABLE_SIZE limit therefore it is partitioned
assertReorderJoins()
.setSystemProperty(JOIN_DISTRIBUTION_TYPE, AUTOMATIC.name())
.setSystemProperty(JOIN_MAX_BROADCAST_TABLE_SIZE, "100MB")
Expand Down Expand Up @@ -649,7 +649,7 @@ public void testReorderAndReplicate()
.addSymbolStatistics(ImmutableMap.of(new Symbol("B1"), new SymbolStatsEstimate(0, 100, 0, 640000, 10)))
.build();

// A table is small enough to be replicated in AUTOMATIC_RESTRICTED mode
// A table is small enough to be replicated in JOIN_MAX_BROADCAST_TABLE_SIZE mode
assertReorderJoins()
.setSystemProperty(JOIN_DISTRIBUTION_TYPE, AUTOMATIC.name())
.setSystemProperty(JOIN_REORDERING_STRATEGY, AUTOMATIC.name())
Expand Down