private TupleBatch outputPhase() throws BlockedException, TeiidComponentException, TeiidProcessingException { if (!this.output.isFinal()) { this.phase = SORT; } else if (!usingOutput) { this.output.setForwardOnly(true); } List<?> tuple = null; try { while ((tuple = this.outputTs.nextTuple()) != null) { //resize to remove unrelated columns if (this.getElements().size() < tuple.size()) { tuple = new ArrayList<Object>(tuple.subList(0, this.getElements().size())); } addBatchRow(tuple); if (this.isBatchFull()) { return pullBatch(); } } } catch (BlockedException e) { if (this.hasPendingRows()) { return this.pullBatch(); } throw e; } this.terminateBatches(); return this.pullBatch(); }
private TupleBatch outputPhase() throws BlockedException, TeiidComponentException, TeiidProcessingException { if (!this.output.isFinal()) { this.phase = SORT; } else if (!usingOutput) { this.output.setForwardOnly(true); } List<?> tuple = null; try { while ((tuple = this.outputTs.nextTuple()) != null) { //resize to remove unrelated columns if (this.getElements().size() < tuple.size()) { tuple = new ArrayList<Object>(tuple.subList(0, this.getElements().size())); } addBatchRow(tuple); if (this.isBatchFull()) { return pullBatch(); } } } catch (BlockedException e) { if (this.hasPendingRows()) { return this.pullBatch(); } throw e; } this.terminateBatches(); return this.pullBatch(); }
private TupleBatch outputPhase() throws BlockedException, TeiidComponentException, TeiidProcessingException { if (!this.output.isFinal()) { this.phase = SORT; } else if (!usingOutput) { this.output.setForwardOnly(true); } List<?> tuple = null; try { while ((tuple = this.outputTs.nextTuple()) != null) { //resize to remove unrelated columns if (this.getElements().size() < tuple.size()) { tuple = new ArrayList<Object>(tuple.subList(0, this.getElements().size())); } addBatchRow(tuple); if (this.isBatchFull()) { return pullBatch(); } } } catch (BlockedException e) { if (this.hasPendingRows()) { return this.pullBatch(); } throw e; } this.terminateBatches(); return this.pullBatch(); }