presto-main/src/main/java/io/prestosql/sql/planner/iterative/rule/ReorderJoins.java/ReorderJoins/ReorderJoins
class ReorderJoins:    public ReorderJoins(Metadata metadata, CostComparator costComparator)
    {
        this.metadata = requireNonNull(metadata, "metadata is null");
        this.costComparator = requireNonNull(costComparator, "costComparator is null");
        this.pattern = join().matching(
                joinNode -> !joinNode.getDistributionType().isPresent()
                        && joinNode.getType() == INNER
                        && isDeterministic(joinNode.getFilter().orElse(TRUE_LITERAL), metadata));
    }