presto-main/src/main/java/io/prestosql/sql/planner/iterative/rule/RemoveRedundantTableScanPredicate.java/RemoveRedundantTableScanPredicate/apply
class RemoveRedundantTableScanPredicate:    @Override
    public Result apply(FilterNode filterNode, Captures captures, Context context)
    {
        TableScanNode tableScan = captures.get(TABLE_SCAN);

        PlanNode rewritten = removeRedundantTableScanPredicate(
                tableScan,
                filterNode.getPredicate(),
                context.getSession(),
                context.getSymbolAllocator().getTypes(),
                context.getIdAllocator());

        if (rewritten instanceof FilterNode
                && Objects.equals(((FilterNode) rewritten).getPredicate(), filterNode.getPredicate())) {
            return Result.empty();
        }

        return Result.ofPlanNode(rewritten);
    }