Skip to content

Commit

Permalink
Inline unnecessary method
Browse files Browse the repository at this point in the history
  • Loading branch information
martint committed Mar 9, 2019
1 parent 6b3afda commit 0a767d3
Showing 1 changed file with 10 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,16 @@ public Result apply(FilterNode filterNode, Captures captures, Context context)
{
TableScanNode tableScan = captures.get(TABLE_SCAN);

PlanNode rewritten = planTableScan(tableScan, filterNode.getPredicate(), context.getSession(), context.getSymbolAllocator().getTypes(), context.getIdAllocator(), metadata, parser, domainTranslator);
PlanNode rewritten = pushFilterIntoTableScan(
tableScan,
filterNode.getPredicate(),
false,
context.getSession(),
context.getSymbolAllocator().getTypes(),
context.getIdAllocator(),
metadata,
parser,
domainTranslator);

if (arePlansSame(filterNode, tableScan, rewritten)) {
return Result.empty();
Expand Down Expand Up @@ -229,28 +238,6 @@ public Result apply(TableScanNode tableScanNode, Captures captures, Context cont
}
}

private static PlanNode planTableScan(
TableScanNode node,
Expression predicate,
Session session,
TypeProvider types,
PlanNodeIdAllocator idAllocator,
Metadata metadata,
SqlParser parser,
DomainTranslator domainTranslator)
{
return pushFilterIntoTableScan(
node,
predicate,
false,
session,
types,
idAllocator,
metadata,
parser,
domainTranslator);
}

public static PlanNode pushFilterIntoTableScan(
TableScanNode node,
Expression predicate,
Expand Down

0 comments on commit 0a767d3

Please sign in to comment.