@Override public void open() throws TeiidComponentException, TeiidProcessingException { if (shouldEvaluate) { preEvalCriteria = QueryRewriter.evaluateAndRewrite((Criteria)criteria.clone(), getEvaluator(elementMap), getContext(), this.getContext().getMetadata()); if (preEvalCriteria.equals(QueryRewriter.FALSE_CRITERIA) || preEvalCriteria.equals(QueryRewriter.UNKNOWN_CRITERIA)) { noRows = true; return; } } super.open(); }
@Override public void open() throws TeiidComponentException, TeiidProcessingException { if (shouldEvaluate) { preEvalCriteria = QueryRewriter.evaluateAndRewrite((Criteria)criteria.clone(), getEvaluator(elementMap), getContext(), this.getContext().getMetadata()); if (preEvalCriteria.equals(QueryRewriter.FALSE_CRITERIA) || preEvalCriteria.equals(QueryRewriter.UNKNOWN_CRITERIA)) { noRows = true; return; } } super.open(); }
/** * @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(); }
List<?> tuple = currentBatch.getTuple(currentRow); if(getEvaluator(this.elementMap).evaluate(this.preEvalCriteria!=null?preEvalCriteria:criteria, tuple)) { addBatchRow(projectTuple(this.projectionIndexes, tuple));
List<?> tuple = currentBatch.getTuple(currentRow); if(getEvaluator(this.elementMap).evaluate(this.preEvalCriteria!=null?preEvalCriteria:criteria, tuple)) { addBatchRow(projectTuple(this.projectionIndexes, tuple));