Skip to content

Commit

Permalink
Remove unused PlanNodeDecorrelator#idAllocator
Browse files Browse the repository at this point in the history
  • Loading branch information
sopel39 committed Sep 11, 2019
1 parent 7f9fc3e commit 9ce1b27
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public Result apply(CorrelatedJoinNode correlatedJoinNode, Captures captures, Co
{
PlanNode subquery = correlatedJoinNode.getSubquery();

PlanNodeDecorrelator planNodeDecorrelator = new PlanNodeDecorrelator(context.getIdAllocator(), context.getSymbolAllocator(), context.getLookup());
PlanNodeDecorrelator planNodeDecorrelator = new PlanNodeDecorrelator(context.getSymbolAllocator(), context.getLookup());
Optional<DecorrelatedNode> decorrelatedNodeOptional = planNodeDecorrelator.decorrelateFilters(subquery, correlatedJoinNode.getCorrelation());

return decorrelatedNodeOptional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ private Optional<PlanNode> rewriteToNonDefaultAggregation(ApplyNode applyNode, C
false),
Assignments.of(subqueryTrue, TRUE_LITERAL));

PlanNodeDecorrelator decorrelator = new PlanNodeDecorrelator(context.getIdAllocator(), context.getSymbolAllocator(), context.getLookup());
PlanNodeDecorrelator decorrelator = new PlanNodeDecorrelator(context.getSymbolAllocator(), context.getLookup());
if (!decorrelator.decorrelateFilters(subquery, applyNode.getCorrelation()).isPresent()) {
return Optional.empty();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import io.prestosql.spi.block.SortOrder;
import io.prestosql.sql.ExpressionUtils;
import io.prestosql.sql.planner.OrderingScheme;
import io.prestosql.sql.planner.PlanNodeIdAllocator;
import io.prestosql.sql.planner.Symbol;
import io.prestosql.sql.planner.SymbolAllocator;
import io.prestosql.sql.planner.SymbolsExtractor;
Expand Down Expand Up @@ -63,13 +62,11 @@

public class PlanNodeDecorrelator
{
private final PlanNodeIdAllocator idAllocator;
private final SymbolAllocator symbolAllocator;
private final Lookup lookup;

public PlanNodeDecorrelator(PlanNodeIdAllocator idAllocator, SymbolAllocator symbolAllocator, Lookup lookup)
public PlanNodeDecorrelator(SymbolAllocator symbolAllocator, Lookup lookup)
{
this.idAllocator = requireNonNull(idAllocator, "idAllocator is null");
this.symbolAllocator = requireNonNull(symbolAllocator, "symbolAllocator is null");
this.lookup = requireNonNull(lookup, "lookup is null");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public ScalarAggregationToJoinRewriter(Metadata metadata, SymbolAllocator symbol
this.symbolAllocator = requireNonNull(symbolAllocator, "symbolAllocator is null");
this.idAllocator = requireNonNull(idAllocator, "idAllocator is null");
this.lookup = requireNonNull(lookup, "lookup is null");
this.planNodeDecorrelator = new PlanNodeDecorrelator(idAllocator, symbolAllocator, lookup);
this.planNodeDecorrelator = new PlanNodeDecorrelator(symbolAllocator, lookup);
}

public PlanNode rewriteScalarAggregation(CorrelatedJoinNode correlatedJoinNode, AggregationNode aggregation)
Expand Down

0 comments on commit 9ce1b27

Please sign in to comment.