if (ts == null) {
variables = allColumns;
//TODO: coordinate a distributed load
//TODO: order by primary key nulls first - then have an insert ordered optimization
String transformation = metadata.getVirtualPlan(group.getMetadataID()).getQuery();
QueryProcessor qp = context.getQueryProcessorFactory().createQueryProcessor(transformation, fullName, context);
qp.setNonBlocking(true);
qp.getContext().setDataObjects(null);
if (distributedCache != null) {
CachedResults cr = new CachedResults();
BatchCollector bc = qp.createBatchCollector();
TupleBuffer tb = bc.collectTuples();
cr.setResults(tb, qp.getProcessorPlan());
touchTable(context, fullName, true);
this.distributedCache.put(cid, Determinism.VDB_DETERMINISTIC, cr, info.getTtl());
ts = tb.createIndexedTupleSource();
} else {
ts = new BatchCollector.BatchProducerTupleSource(qp);