Changed CompareRelation to Predicate.