use of org.teiid.query.tempdata.TempTableStore.TableProcessor in project teiid by teiid.
the class RelationalPlan method open.
@Override
public void open() throws TeiidComponentException, TeiidProcessingException {
if (with != null && tempTableStore.getProcessors() == null) {
HashMap<String, TableProcessor> processors = new HashMap<String, TableProcessor>();
tempTableStore.setProcessors(processors);
for (WithQueryCommand withCommand : this.with) {
if (withCommand.isRecursive()) {
SetQuery setQuery = (SetQuery) withCommand.getCommand();
ProcessorPlan initial = setQuery.getLeftQuery().getProcessorPlan();
QueryProcessor withProcessor = new QueryProcessor(initial, getContext().clone(), root.getBufferManager(), root.getDataManager());
processors.put(withCommand.getGroupSymbol().getName(), new RecursiveTableProcessor(withProcessor, withCommand.getColumns(), setQuery.getRightQuery().getProcessorPlan(), setQuery.isAll()));
continue;
}
ProcessorPlan plan = withCommand.getCommand().getProcessorPlan();
QueryProcessor withProcessor = new QueryProcessor(plan, getContext().clone(), root.getBufferManager(), root.getDataManager());
processors.put(withCommand.getGroupSymbol().getName(), new TableProcessor(withProcessor, withCommand.getColumns()));
}
}
this.root.open();
}
Aggregations