Search in sources :

Example 1 with TruePredicate

use of com.hazelcast.query.impl.predicates.TruePredicate in project hazelcast by hazelcast.

the class HazelcastConnectorTest method when_readMap_withProjectionToNull_then_nullsSkipped.

@Test
public void when_readMap_withProjectionToNull_then_nullsSkipped() {
    IMap<Integer, Entry<Integer, String>> sourceMap = instance().getMap(sourceName);
    range(0, ENTRY_COUNT).forEach(i -> sourceMap.put(i, entry(i, i % 2 == 0 ? null : String.valueOf(i))));
    DAG dag = new DAG();
    Vertex source = dag.newVertex("source", readMapP(sourceName, new TruePredicate<>(), Projections.singleAttribute("value")));
    Vertex sink = dag.newVertex("sink", writeListP(sinkName));
    dag.edge(between(source, sink));
    instance().getJet().newJob(dag).join();
    checkContents_projectedToNull(sinkName);
}
Also used : Vertex(com.hazelcast.jet.core.Vertex) Entry(java.util.Map.Entry) TruePredicate(com.hazelcast.query.impl.predicates.TruePredicate) DAG(com.hazelcast.jet.core.DAG) ParallelJVMTest(com.hazelcast.test.annotation.ParallelJVMTest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Aggregations

DAG (com.hazelcast.jet.core.DAG)1 Vertex (com.hazelcast.jet.core.Vertex)1 TruePredicate (com.hazelcast.query.impl.predicates.TruePredicate)1 ParallelJVMTest (com.hazelcast.test.annotation.ParallelJVMTest)1 QuickTest (com.hazelcast.test.annotation.QuickTest)1 Entry (java.util.Map.Entry)1 Test (org.junit.Test)1