Search in sources :

Example 1 with TruePredicate

use of com.hazelcast.query.TruePredicate in project hazelcast-jet by hazelcast.

the class HazelcastConnectorTest method when_readMap_withProjectionToNull_then_nullsSkipped.

@Test
public void when_readMap_withProjectionToNull_then_nullsSkipped() {
    IMapJet<Integer, Entry<Integer, String>> sourceMap = jetInstance.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));
    jetInstance.newJob(dag).join();
    checkContents_projectedToNull(sinkName);
}
Also used : Vertex(com.hazelcast.jet.core.Vertex) Entry(java.util.Map.Entry) TruePredicate(com.hazelcast.query.TruePredicate) DAG(com.hazelcast.jet.core.DAG) Test(org.junit.Test)

Aggregations

DAG (com.hazelcast.jet.core.DAG)1 Vertex (com.hazelcast.jet.core.Vertex)1 TruePredicate (com.hazelcast.query.TruePredicate)1 Entry (java.util.Map.Entry)1 Test (org.junit.Test)1