TupleBuffer createSourceTupleBuffer() throws TeiidComponentException { return this.source.getBufferManager().createTupleBuffer(source.getElements(), source.getConnectionID(), TupleSourceType.PROCESSOR); }
TupleBuffer createSourceTupleBuffer() throws TeiidComponentException { return this.source.getBufferManager().createTupleBuffer(source.getElements(), source.getConnectionID(), TupleSourceType.PROCESSOR); }
TupleBuffer createSourceTupleBuffer() throws TeiidComponentException { return this.source.getBufferManager().createTupleBuffer(source.getElements(), source.getConnectionID(), TupleSourceType.PROCESSOR); }
public TupleBuffer getTupleBuffer() throws TeiidComponentException, TeiidProcessingException { if (this.buffer == null) { if (this.iterator instanceof BatchIterator) { throw new AssertionError("cannot buffer the source"); //$NON-NLS-1$ } if (source.hasBuffer()) { this.buffer = source.getBuffer(-1); Assertion.assertTrue(this.buffer.isFinal()); return this.buffer; } if (collector == null) { collector = new BatchCollector(source, source.getBufferManager(), source.getContext(), false); } this.buffer = collector.collectTuples(); } return this.buffer; }
this.maxPredicates = maxPredicates; this.dependentNode = dependentNode; this.eval = new SubqueryAwareEvaluator(Collections.emptyMap(), dependentNode.getDataManager(), dependentNode.getContext(), dependentNode.getBufferManager()); queryCriteria = Criteria.separateCriteriaByAnd(dependentCriteria);
public TupleBuffer getTupleBuffer() throws TeiidComponentException, TeiidProcessingException { if (this.buffer == null) { if (this.iterator instanceof BatchIterator) { throw new AssertionError("cannot buffer the source"); //$NON-NLS-1$ } if (source.hasBuffer()) { this.buffer = source.getBuffer(-1); Assertion.assertTrue(this.buffer.isFinal()); return this.buffer; } if (collector == null) { collector = new BatchCollector(source, source.getBufferManager(), source.getContext(), false); } this.buffer = collector.collectTuples(); } return this.buffer; }
public TupleBuffer getTupleBuffer() throws TeiidComponentException, TeiidProcessingException { if (this.buffer == null) { if (this.iterator instanceof BatchIterator) { throw new AssertionError("cannot buffer the source"); //$NON-NLS-1$ } if (source.hasBuffer()) { this.buffer = source.getBuffer(-1); Assertion.assertTrue(this.buffer.isFinal()); return this.buffer; } if (collector == null) { collector = new BatchCollector(source, source.getBufferManager(), source.getContext(), false); } this.buffer = collector.collectTuples(); } return this.buffer; }
this.sortUtility = new SortUtility(null, sortSymbols, sortDirection, Mode.DUP_REMOVE, dependentNode.getBufferManager(), dependentNode.getConnectionID(), originalVs.getSchema()); this.sortUtility.setWorkingBuffer(originalVs.getTupleBuffer());
this.maxPredicates = maxPredicates; this.dependentNode = dependentNode; this.eval = new SubqueryAwareEvaluator(Collections.emptyMap(), dependentNode.getDataManager(), dependentNode.getContext(), dependentNode.getBufferManager()); queryCriteria = Criteria.separateCriteriaByAnd(dependentCriteria);
this.sortUtility = new SortUtility(null, sortSymbols, sortDirection, Mode.DUP_REMOVE, dependentNode.getBufferManager(), dependentNode.getConnectionID(), originalVs.getSchema()); this.sortUtility.setWorkingBuffer(originalVs.getTupleBuffer());
this.sortUtility = new SortUtility(null, sortSymbols, sortDirection, Mode.DUP_REMOVE, dependentNode.getBufferManager(), dependentNode.getConnectionID(), originalVs.getSchema()); this.sortUtility.setWorkingBuffer(originalVs.getTupleBuffer());
@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(); }
sortOption == SortOption.SORT_DISTINCT?Mode.DUP_REMOVE_SORT:Mode.SORT, this.source.getBufferManager(), this.source.getConnectionID(), source.getElements()); this.markExpressionsDistinct(sortOption == SortOption.SORT_DISTINCT && expressions.size() == this.getOuterVals().size()); if (this.buffer != null) {
sortOption == SortOption.SORT_DISTINCT?Mode.DUP_REMOVE_SORT:Mode.SORT, this.source.getBufferManager(), this.source.getConnectionID(), source.getElements()); this.markExpressionsDistinct(sortOption == SortOption.SORT_DISTINCT && expressions.size() == this.getOuterVals().size()); if (this.buffer != null) {
@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(); }
@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(); }
sortOption == SortOption.SORT_DISTINCT?Mode.DUP_REMOVE_SORT:Mode.SORT, this.source.getBufferManager(), this.source.getConnectionID(), source.getElements()); this.markExpressionsDistinct(sortOption == SortOption.SORT_DISTINCT && expressions.size() == this.getOuterVals().size()); if (this.buffer != null) {
/** * Pro-actively pull batches for later use. * There are unfortunately quite a few cases to cover here. */ protected void prefetch(long limit) throws TeiidComponentException, TeiidProcessingException { if (!open) { return; } if (this.buffer == null) { if (this.sortUtility != null) { return; } if (this.iterator != null) { ((BatchIterator)this.iterator).readAhead(limit); return; } if (source.hasBuffer()) { this.buffer = source.getBuffer(-1); return; } if (collector == null) { collector = new BatchCollector(source, source.getBufferManager(), source.getContext(), false); } if (collector.getTupleBuffer() != null && collector.getTupleBuffer().getManagedRowCount() >= limit) { return; } this.buffer = collector.collectTuples(true); } }
/** * Pro-actively pull batches for later use. * There are unfortunately quite a few cases to cover here. */ protected void prefetch(long limit) throws TeiidComponentException, TeiidProcessingException { if (!open) { return; } if (this.buffer == null) { if (this.sortUtility != null) { return; } if (this.iterator != null) { ((BatchIterator)this.iterator).readAhead(limit); return; } if (source.hasBuffer()) { this.buffer = source.getBuffer(-1); return; } if (collector == null) { collector = new BatchCollector(source, source.getBufferManager(), source.getContext(), false); } if (collector.getTupleBuffer() != null && collector.getTupleBuffer().getManagedRowCount() >= limit) { return; } this.buffer = collector.collectTuples(true); } }
/** * Pro-actively pull batches for later use. * There are unfortunately quite a few cases to cover here. */ protected void prefetch(long limit) throws TeiidComponentException, TeiidProcessingException { if (!open) { return; } if (this.buffer == null) { if (this.sortUtility != null) { return; } if (this.iterator != null) { ((BatchIterator)this.iterator).readAhead(limit); return; } if (source.hasBuffer()) { this.buffer = source.getBuffer(-1); return; } if (collector == null) { collector = new BatchCollector(source, source.getBufferManager(), source.getContext(), false); } if (collector.getTupleBuffer() != null && collector.getTupleBuffer().getManagedRowCount() >= limit) { return; } this.buffer = collector.collectTuples(true); } }