@Override public TupleBuffer getBuffer(int maxRows) throws BlockedException, TeiidComponentException, TeiidProcessingException { return root.getBuffer(maxRows); }
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; }
@Override public TupleBuffer getBuffer(int maxRows) throws BlockedException, TeiidComponentException, TeiidProcessingException { return root.getBuffer(maxRows); }
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; }
@Override public TupleBuffer getBuffer(int maxRows) throws BlockedException, TeiidComponentException, TeiidProcessingException { return root.getBuffer(maxRows); }
/** * 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); } }
@Override public TupleBuffer getBufferDirect(int maxRows) throws BlockedException, TeiidComponentException, TeiidProcessingException { if (maxRows >= 0) { if (limit >= 0) { maxRows = Math.min(maxRows, limit); } } else { maxRows = limit; } return this.getChildren()[0].getBuffer(maxRows); }
/** * 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); } }
@Override public TupleBuffer getBufferDirect(int maxRows) throws BlockedException, TeiidComponentException, TeiidProcessingException { return this.getChildren()[0].getBuffer(maxRows); }
/** * 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); } }
@Override public TupleBuffer getBufferDirect(int maxRows) throws BlockedException, TeiidComponentException, TeiidProcessingException { if (maxRows >= 0) { if (limit >= 0) { maxRows = Math.min(maxRows, limit); } } else { maxRows = limit; } return this.getChildren()[0].getBuffer(maxRows); }
@Override public TupleBuffer getBufferDirect(int maxRows) throws BlockedException, TeiidComponentException, TeiidProcessingException { return this.getChildren()[0].getBuffer(maxRows); }
@Override public TupleBuffer getBufferDirect(int maxRows) throws BlockedException, TeiidComponentException, TeiidProcessingException { return this.getChildren()[0].getBuffer(maxRows); }
@Override public TupleBuffer getBufferDirect(int maxRows) throws BlockedException, TeiidComponentException, TeiidProcessingException { if (maxRows >= 0) { if (limit >= 0) { maxRows = Math.min(maxRows, limit); } } else { maxRows = limit; } return this.getChildren()[0].getBuffer(maxRows); }
private void sortPhase() throws BlockedException, TeiidComponentException, TeiidProcessingException { if (this.sortUtility == null) { TupleSource ts = null; TupleBuffer working = null; if (!getChildren()[0].hasBuffer()) { ts = new BatchIterator(getChildren()[0]); } else { working = getChildren()[0].getBuffer(-1); } this.sortUtility = new SortUtility(ts, items, this.mode, getBufferManager(), getConnectionID(), getChildren()[0].getElements()); if (ts == null) { this.sortUtility.setWorkingBuffer(working); } } this.output = this.sortUtility.sort(rowLimit); if (this.outputTs == null) { this.outputTs = this.output.createIndexedTupleSource(); } this.phase = OUTPUT; }
private void sortPhase() throws BlockedException, TeiidComponentException, TeiidProcessingException { if (this.sortUtility == null) { TupleSource ts = null; TupleBuffer working = null; if (!getChildren()[0].hasBuffer()) { ts = new BatchIterator(getChildren()[0]); } else { working = getChildren()[0].getBuffer(-1); } this.sortUtility = new SortUtility(ts, items, this.mode, getBufferManager(), getConnectionID(), getChildren()[0].getElements()); if (ts == null) { this.sortUtility.setWorkingBuffer(working); } } this.output = this.sortUtility.sort(rowLimit); if (this.outputTs == null) { this.outputTs = this.output.createIndexedTupleSource(); } this.phase = OUTPUT; }
private void sortPhase() throws BlockedException, TeiidComponentException, TeiidProcessingException { if (this.sortUtility == null) { TupleSource ts = null; TupleBuffer working = null; if (!getChildren()[0].hasBuffer()) { ts = new BatchIterator(getChildren()[0]); } else { working = getChildren()[0].getBuffer(-1); } this.sortUtility = new SortUtility(ts, items, this.mode, getBufferManager(), getConnectionID(), getChildren()[0].getElements()); if (ts == null) { this.sortUtility.setWorkingBuffer(working); } } this.output = this.sortUtility.sort(rowLimit); if (this.outputTs == null) { this.outputTs = this.output.createIndexedTupleSource(); } this.phase = OUTPUT; }