}
@SuppressWarnings("unchecked")
@Override
public boolean source(FlowProcess<Properties> flowProcess, SourceCall<Object[], ScrollQuery> sourceCall) throws IOException {
ScrollQuery query = sourceCall.getInput();
if (!query.hasNext()) {
return false;
}
TupleEntry entry = sourceCall.getIncomingEntry();
Map<String, ?> data = (Map<String, ?>) query.next()[1];
FieldAlias alias = (FieldAlias) sourceCall.getContext()[0];
if (entry.getFields().isDefined()) {
// lookup using writables
// TODO: it's worth benchmarking whether using an index/offset yields significantly better performance