use of com.hazelcast.query.impl.predicates.VisitorTestSupport.CustomPredicate in project hazelcast by hazelcast.
the class EvaluateVisitorTest method testUnoptimizablePredicates.
@Test
public void testUnoptimizablePredicates() {
assertNoOptimization(alwaysFalse());
assertNoOptimization(new CustomPredicate());
assertNoOptimization(equal("r", 1));
assertNoOptimization(equal("nc", 1));
assertNoOptimization(notEqual("r", 1));
assertNoOptimization(notEqual("nc", 1));
assertNoOptimization(in("r", 1, 2, 3));
assertNoOptimization(in("nc", 1, 2, 3));
assertNoOptimization(and());
assertNoOptimization(or());
assertNoOptimization(and(equal("r", 1)));
assertNoOptimization(and(equal("nc", 1)));
assertNoOptimization(and(new CustomPredicate()));
assertNoOptimization(or(equal("noIndex", 1)));
assertNoOptimization(or(in("noIndex", 1, 2, 5)));
assertNoOptimization(or(equal("r", 1)));
assertNoOptimization(or(equal("nc", 1)));
assertNoOptimization(or(new CustomPredicate(), new CustomPredicate()));
assertNoOptimization(and(equal("r", 1), equal("noIndex", 1)));
assertNoOptimization(or(equal("r", 1), equal("noIndex", 1)));
assertNoOptimization(not(equal("r", 1)));
assertNoOptimization(not(equal("nc", 1)));
assertNoOptimization(notEqual("noIndex", 1));
}
Aggregations