@Override public void initialize(CommandContext context, BufferManager bufferManager, ProcessorDataManager dataMgr) { super.initialize(context, bufferManager, dataMgr); // Create element lookup map for evaluating project expressions if(this.elementMap == null) { this.elementMap = createLookupMap(this.getChildren()[0].getElements()); this.projectionIndexes = getProjectionIndexes(this.elementMap, projectedExpressions!=null?projectedExpressions:getElements()); } }
@Override public void initialize(CommandContext context, BufferManager bufferManager, ProcessorDataManager dataMgr) { super.initialize(context, bufferManager, dataMgr); // Create element lookup map for evaluating project expressions if(this.elementMap == null) { this.elementMap = createLookupMap(this.getChildren()[0].getElements()); this.projectionIndexes = getProjectionIndexes(this.elementMap, projectedExpressions!=null?projectedExpressions:getElements()); } }
@Override public void initialize(CommandContext context, BufferManager bufferManager, ProcessorDataManager dataMgr) { super.initialize(context, bufferManager, dataMgr); // Create element lookup map for evaluating project expressions if(this.elementMap == null) { this.elementMap = createLookupMap(this.getChildren()[0].getElements()); this.projectionIndexes = getProjectionIndexes(this.elementMap, projectedExpressions!=null?projectedExpressions:getElements()); } }
/** * @see org.teiid.query.processor.relational.RelationalNode#nextBatchDirect() */ public TupleBatch nextBatchDirect() throws BlockedException, TeiidComponentException, TeiidProcessingException { if(currentBatch == null) { currentBatch = this.getChildren()[0].nextBatch(); } while (currentRow <= currentBatch.getEndRow() && !isBatchFull()) { List<?> tuple = currentBatch.getTuple(currentRow); if(getEvaluator(this.elementMap).evaluate(this.criteria, tuple)) { addBatchRow(projectTuple(this.projectionIndexes, tuple)); } currentRow++; } if (currentRow > currentBatch.getEndRow()) { if(currentBatch.getTerminationFlag()) { terminateBatches(); } currentBatch = null; } return pullBatch(); }
currentBatch = this.getChildren()[0].nextBatch();
currentBatch = this.getChildren()[0].nextBatch();