Skip to content

Commit

Permalink
Do not simplify dynamic filters when these are fetched by coordinator
Browse files Browse the repository at this point in the history
There are now detailed limits for replicated/repartitioned and
small/large dynamic filters. Additionally, there is dedicated
endpoint for fetching dynamic filters by coordinator. Therefore,
simplification of dynamic filters is no longer needed.

Small dynamic filters limits were adjusted so that they are
similar to previous limits.
  • Loading branch information
sopel39 committed Sep 30, 2020
1 parent 5b8cc64 commit b1ed658
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public void testJoinWithNonSelectiveBuildSide()
range(INTEGER, 1L, true, 100L, true)), false)
.toString(getSession().toConnectorSession()));
assertEquals(domainStats.getDiscreteValuesCount(), 0);
assertEquals(domainStats.getRangeCount(), 1);
assertEquals(domainStats.getRangeCount(), 100);
}

@Test(timeOut = 30_000)
Expand Down Expand Up @@ -298,7 +298,7 @@ public void testSemiJoinWithNonSelectiveBuildSide()
range(INTEGER, 1L, true, 100L, true)), false)
.toString(getSession().toConnectorSession()));
assertEquals(domainStats.getDiscreteValuesCount(), 0);
assertEquals(domainStats.getRangeCount(), 1);
assertEquals(domainStats.getRangeCount(), 100);
}

@Test(timeOut = 30_000)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ public class DynamicFilterConfig
private int smallBroadcastMaxDistinctValuesPerDriver = 100;
private DataSize smallBroadcastMaxSizePerDriver = DataSize.of(10, KILOBYTE);
private int smallBroadcastRangeRowLimitPerDriver;
private int smallPartitionedMaxDistinctValuesPerDriver = 100;
private int smallPartitionedMaxDistinctValuesPerDriver = 10;
private DataSize smallPartitionedMaxSizePerDriver = DataSize.of(10, KILOBYTE);
private int smallPartitionedRangeRowLimitPerDriver;
private int smallPartitionedRangeRowLimitPerDriver = 100;

private int largeBroadcastMaxDistinctValuesPerDriver = 5_000;
private DataSize largeBroadcastMaxSizePerDriver = DataSize.of(500, KILOBYTE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public void updateDomains(Map<DynamicFilterId, Domain> newDynamicFilterDomains)
for (Map.Entry<DynamicFilterId, Domain> entry : newDynamicFilterDomains.entrySet()) {
dynamicFilterDomains.merge(
entry.getKey(),
new VersionedDomain(currentVersion, entry.getValue().simplify()),
new VersionedDomain(currentVersion, entry.getValue()),
(oldDomain, newDomain) -> new VersionedDomain(
max(oldDomain.getVersion(), newDomain.getVersion()),
oldDomain.getDomain().intersect(newDomain.getDomain())));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ public void testDefaults()
.setSmallBroadcastMaxDistinctValuesPerDriver(100)
.setSmallBroadcastMaxSizePerDriver(DataSize.of(10, KILOBYTE))
.setSmallBroadcastRangeRowLimitPerDriver(0)
.setSmallPartitionedMaxDistinctValuesPerDriver(100)
.setSmallPartitionedMaxDistinctValuesPerDriver(10)
.setSmallPartitionedMaxSizePerDriver(DataSize.of(10, KILOBYTE))
.setSmallPartitionedRangeRowLimitPerDriver(0)
.setSmallPartitionedRangeRowLimitPerDriver(100)
.setLargeBroadcastMaxDistinctValuesPerDriver(5000)
.setLargeBroadcastMaxSizePerDriver(DataSize.of(500, KILOBYTE))
.setLargeBroadcastRangeRowLimitPerDriver(50_000)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@

import static io.prestosql.SystemSessionProperties.JOIN_DISTRIBUTION_TYPE;
import static io.prestosql.SystemSessionProperties.JOIN_REORDERING_STRATEGY;
import static io.prestosql.SystemSessionProperties.TASK_CONCURRENCY;
import static io.prestosql.spi.predicate.Domain.singleValue;
import static io.prestosql.spi.type.BigintType.BIGINT;
import static io.prestosql.sql.analyzer.FeaturesConfig.JoinDistributionType.BROADCAST;
Expand Down Expand Up @@ -99,6 +100,7 @@ protected QueryRunner createQueryRunner()
Session session = testSessionBuilder()
.setCatalog("test")
.setSchema("default")
.setSystemProperty(TASK_CONCURRENCY, "2")
.setSystemProperty(JOIN_REORDERING_STRATEGY, NONE.name())
.setSystemProperty(JOIN_DISTRIBUTION_TYPE, PARTITIONED.name())
.build();
Expand Down

0 comments on commit b1ed658

Please sign in to comment.