presto-main/src/main/java/io/prestosql/sql/planner/iterative/rule/PreconditionRules.java/PreconditionRules/checkRulesAreFiredBeforeAddExchangesRule
class PreconditionRules:    public static Rule<ExchangeNode> checkRulesAreFiredBeforeAddExchangesRule()
    {
        return checkNoPlanNodeMatches(exchange(), "Expected rules to be fired before 'AddExchanges' optimizer");
    }