public Object clone(){ SelectNode clonedNode = new SelectNode(); this.copyTo(clonedNode); return clonedNode; }
@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()); } }
this.terminateBatches(); return pullBatch(); currentBatch = this.getChildren()[0].nextBatch(); while (currentRow <= currentBatch.getEndRow() && !isBatchFull()) { List<?> tuple = currentBatch.getTuple(currentRow); if(getEvaluator(this.elementMap).evaluate(this.preEvalCriteria!=null?preEvalCriteria:criteria, tuple)) { addBatchRow(projectTuple(this.projectionIndexes, tuple)); terminateBatches(); return pullBatch();
selectNode.setCriteria(criteria); selectNode.setElements(elements); selectNode.addChild(child); selectNode.initialize(context, mgr, dataMgr); selectNode.open();
SelectNode selnode = new SelectNode(getID()); selnode.setCriteria(crit); selnode.setProjectedExpressions((List<Expression>) node.getProperty(NodeConstants.Info.PROJECT_COLS)); selnode.setShouldEvaluateExpressions(postitional);
SelectNode selnode = new SelectNode(getID()); selnode.setCriteria(crit); selnode.setProjectedExpressions((List<Expression>) node.getProperty(NodeConstants.Info.PROJECT_COLS)); processNode = selnode;
@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(); }
childElements.add(es1); helpTestSelect(elements, crit, childElements, null, data, new FakeRelationalNode(2, data), new SelectNode(3) { int i = 0;
this.terminateBatches(); return pullBatch(); currentBatch = this.getChildren()[0].nextBatch(); while (currentRow <= currentBatch.getEndRow() && !isBatchFull()) { List<?> tuple = currentBatch.getTuple(currentRow); if(getEvaluator(this.elementMap).evaluate(this.preEvalCriteria!=null?preEvalCriteria:criteria, tuple)) { addBatchRow(projectTuple(this.projectionIndexes, tuple)); terminateBatches(); return pullBatch();
SelectNode selnode = new SelectNode(getID()); selnode.setCriteria(crit); selnode.setProjectedExpressions((List<Expression>) node.getProperty(NodeConstants.Info.PROJECT_COLS)); selnode.setShouldEvaluateExpressions(postitional);
@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(); }
@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()); } }
public Object clone(){ SelectNode clonedNode = new SelectNode(); this.copyTo(clonedNode); return clonedNode; }
@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()); } }
public Object clone(){ SelectNode clonedNode = new SelectNode(); this.copyTo(clonedNode); return clonedNode; }