use of com.hazelcast.jet.core.ResettableSingletonTraverser in project hazelcast by hazelcast.
the class RowProjectorProcessorSupplier method get.
@Nonnull
@Override
public Collection<? extends Processor> get(int count) {
List<Processor> processors = new ArrayList<>(count);
for (int i = 0; i < count; i++) {
ResettableSingletonTraverser<JetSqlRow> traverser = new ResettableSingletonTraverser<>();
KvRowProjector projector = projectorSupplier.get(evalContext, extractors);
Processor processor = new TransformP<LazyMapEntry<Object, Object>, JetSqlRow>(entry -> {
traverser.accept(projector.project(entry.getKeyData(), entry.getValueData()));
return traverser;
});
processors.add(processor);
}
return processors;
}
Aggregations