Search in sources :

Example 1 with CustomPredicate

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));
}
Also used : CustomPredicate(com.hazelcast.query.impl.predicates.VisitorTestSupport.CustomPredicate) ParallelJVMTest(com.hazelcast.test.annotation.ParallelJVMTest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Aggregations

CustomPredicate (com.hazelcast.query.impl.predicates.VisitorTestSupport.CustomPredicate)1 ParallelJVMTest (com.hazelcast.test.annotation.ParallelJVMTest)1 QuickTest (com.hazelcast.test.annotation.QuickTest)1 Test (org.junit.Test)1