presto-main/src/main/java/io/prestosql/sql/planner/iterative/rule/EliminateCrossJoins.java/EliminateCrossJoins/isEnabled
class EliminateCrossJoins:    @Override
    public boolean isEnabled(Session session)
    {
        // we run this for cost-based reordering also for cases when some of the tables do not have statistics
        JoinReorderingStrategy joinReorderingStrategy = getJoinReorderingStrategy(session);
        return joinReorderingStrategy == ELIMINATE_CROSS_JOINS || joinReorderingStrategy == AUTOMATIC;
    }