public void open() throws TeiidComponentException, TeiidProcessingException { for(int i=0; i<children.length; i++) { if(children[i] != null) { children[i].open(); } else { break; } } }
public void open() throws TeiidComponentException, TeiidProcessingException { for(int i=0; i<children.length; i++) { if(children[i] != null) { children[i].open(); } else { break; } } }
public void open() throws TeiidComponentException, TeiidProcessingException { for(int i=0; i<children.length; i++) { if(children[i] != null) { children[i].open(); } else { break; } } }
protected void openLeft() throws TeiidComponentException, TeiidProcessingException { if (!this.leftSource.open) { leftSource.getSource().open(); this.leftSource.open = true; } }
protected void openLeft() throws TeiidComponentException, TeiidProcessingException { if (!this.leftSource.open) { leftSource.getSource().open(); this.leftSource.open = true; } }
protected void openLeft() throws TeiidComponentException, TeiidProcessingException { if (!this.leftSource.open) { leftSource.getSource().open(); this.leftSource.open = true; } }
@Override public void open() throws TeiidComponentException, TeiidProcessingException { super.open(); stree = getBufferManager().createSTree(this.getElements(), this.getConnectionID(), this.getElements().size()); }
@Override public void open() throws TeiidComponentException, TeiidProcessingException { super.open(); stree = getBufferManager().createSTree(this.getElements(), this.getConnectionID(), this.getElements().size()); }
@Override public void open() throws TeiidComponentException, TeiidProcessingException { super.open(); stree = getBufferManager().createSTree(this.getElements(), this.getConnectionID(), this.getElements().size()); }
public void open() throws TeiidComponentException, TeiidProcessingException { limit = -1; if (limitExpr != null) { Integer limitVal = (Integer)new Evaluator(Collections.emptyMap(), getDataManager(), getContext()).evaluate(limitExpr, Collections.emptyList()); ValidationVisitor.LIMIT_CONSTRAINT.validate(limitVal); limit = limitVal.intValue(); } if (limit == 0) { return; } if (offsetExpr != null) { Integer offsetVal = (Integer)new Evaluator(Collections.emptyMap(), getDataManager(), getContext()).evaluate(offsetExpr, Collections.emptyList()); ValidationVisitor.LIMIT_CONSTRAINT.validate(offsetVal); offset = offsetVal.intValue(); } else { offset = 0; } offsetPhase = offset > 0; if (limit > -1 && this.getChildren()[0] instanceof SortNode) { ((SortNode)this.getChildren()[0]).setRowLimit((int) Math.min(Integer.MAX_VALUE, (long)limit + offset)); } super.open(); }
public void open() throws TeiidComponentException, TeiidProcessingException { limit = -1; if (limitExpr != null) { Integer limitVal = (Integer)new Evaluator(Collections.emptyMap(), getDataManager(), getContext()).evaluate(limitExpr, Collections.emptyList()); ValidationVisitor.LIMIT_CONSTRAINT.validate(limitVal); limit = limitVal.intValue(); } if (limit == 0) { return; } if (offsetExpr != null) { Integer offsetVal = (Integer)new Evaluator(Collections.emptyMap(), getDataManager(), getContext()).evaluate(offsetExpr, Collections.emptyList()); ValidationVisitor.LIMIT_CONSTRAINT.validate(offsetVal); offset = offsetVal.intValue(); } else { offset = 0; } offsetPhase = offset > 0; if (limit > -1 && this.getChildren()[0] instanceof SortNode) { ((SortNode)this.getChildren()[0]).setRowLimit((int) Math.min(Integer.MAX_VALUE, (long)limit + offset)); } super.open(); }
public void open() throws TeiidComponentException, TeiidProcessingException { limit = -1; if (limitExpr != null) { Integer limitVal = (Integer)new Evaluator(Collections.emptyMap(), getDataManager(), getContext()).evaluate(limitExpr, Collections.emptyList()); ValidationVisitor.LIMIT_CONSTRAINT.validate(limitVal); limit = limitVal.intValue(); } if (limit == 0) { return; } if (offsetExpr != null) { Integer offsetVal = (Integer)new Evaluator(Collections.emptyMap(), getDataManager(), getContext()).evaluate(offsetExpr, Collections.emptyList()); ValidationVisitor.LIMIT_CONSTRAINT.validate(offsetVal); offset = offsetVal.intValue(); } else { offset = 0; } offsetPhase = offset > 0; if (limit > -1 && this.getChildren()[0] instanceof SortNode) { ((SortNode)this.getChildren()[0]).setRowLimit((int) Math.min(Integer.MAX_VALUE, (long)limit + offset)); } super.open(); }
protected void openRight() throws TeiidComponentException, TeiidProcessingException { if (!this.rightSource.open) { if (reserved == 0) { reserved = joinNode.getBufferManager().reserveBuffers(joinNode.getBufferManager().getSchemaSize(joinNode.getOutputElements()), BufferReserveMode.FORCE); } rightSource.getSource().open(); this.rightSource.open = true; } }
protected void openRight() throws TeiidComponentException, TeiidProcessingException { if (!this.rightSource.open) { if (reserved == 0) { reserved = joinNode.getBufferManager().reserveBuffers(joinNode.getBufferManager().getSchemaSize(joinNode.getOutputElements()), BufferReserveMode.FORCE); } rightSource.getSource().open(); this.rightSource.open = true; } }
protected void openRight() throws TeiidComponentException, TeiidProcessingException { if (!this.rightSource.open) { if (reserved == 0) { reserved = joinNode.getBufferManager().reserveBuffers(joinNode.getBufferManager().getSchemaSize(joinNode.getOutputElements()), BufferReserveMode.FORCE); } rightSource.getSource().open(); this.rightSource.open = true; } }
public void open() throws TeiidComponentException, TeiidProcessingException { super.open(); // Initialize plan for execution CommandContext subContext = getContext().clone(); subContext.pushVariableContext(new VariableContext()); plan.initialize(subContext, getDataManager(), this.getBufferManager()); if (openPlanImmediately() && prepareNextCommand()) { needsProcessing = true; plan.open(); isOpen = true; } }
@Override public void open() throws TeiidComponentException, TeiidProcessingException { if (with != null && tempTableStore.getProcessors() == null) { HashMap<String, TableProcessor> processors = new HashMap<String, TableProcessor>(); tempTableStore.setProcessors(processors); for (WithQueryCommand withCommand : this.with) { if (withCommand.isRecursive()) { SetQuery setQuery = (SetQuery)withCommand.getCommand(); ProcessorPlan initial = setQuery.getLeftQuery().getProcessorPlan(); QueryProcessor withProcessor = new QueryProcessor(initial, getContext().clone(), root.getBufferManager(), root.getDataManager()); processors.put(withCommand.getGroupSymbol().getName(), new RecursiveTableProcessor(withProcessor, withCommand.getColumns(), setQuery.getRightQuery().getProcessorPlan(), setQuery.isAll())); continue; } ProcessorPlan plan = withCommand.getCommand().getProcessorPlan(); QueryProcessor withProcessor = new QueryProcessor(plan, getContext().clone(), root.getBufferManager(), root.getDataManager()); processors.put(withCommand.getGroupSymbol().getName(), new TableProcessor(withProcessor, withCommand.getColumns())); } } this.root.open(); }
@Override public void open() throws TeiidComponentException, TeiidProcessingException { if (with != null && tempTableStore.getProcessors() == null) { HashMap<String, TableProcessor> processors = new HashMap<String, TableProcessor>(); tempTableStore.setProcessors(processors); for (WithQueryCommand withCommand : this.with) { if (withCommand.isRecursive()) { SetQuery setQuery = (SetQuery)withCommand.getCommand(); ProcessorPlan initial = setQuery.getLeftQuery().getProcessorPlan(); QueryProcessor withProcessor = new QueryProcessor(initial, getContext().clone(), root.getBufferManager(), root.getDataManager()); processors.put(withCommand.getGroupSymbol().getName(), new RecursiveTableProcessor(withProcessor, withCommand.getColumns(), setQuery.getRightQuery().getProcessorPlan(), setQuery.isAll())); continue; } ProcessorPlan plan = withCommand.getCommand().getProcessorPlan(); QueryProcessor withProcessor = new QueryProcessor(plan, getContext().clone(), root.getBufferManager(), root.getDataManager()); processors.put(withCommand.getGroupSymbol().getName(), new TableProcessor(withProcessor, withCommand.getColumns())); } } this.root.open(); }
@Override public void open() throws TeiidComponentException, TeiidProcessingException { if (with != null && tempTableStore.getProcessors() == null) { HashMap<String, TableProcessor> processors = new HashMap<String, TableProcessor>(); tempTableStore.setProcessors(processors); for (WithQueryCommand withCommand : this.with) { if (withCommand.isRecursive()) { SetQuery setQuery = (SetQuery)withCommand.getCommand(); ProcessorPlan initial = setQuery.getLeftQuery().getProcessorPlan(); QueryProcessor withProcessor = new QueryProcessor(initial, getContext().clone(), root.getBufferManager(), root.getDataManager()); processors.put(withCommand.getGroupSymbol().getName(), new RecursiveTableProcessor(withProcessor, withCommand.getColumns(), setQuery.getRightQuery().getProcessorPlan(), setQuery.isAll())); continue; } ProcessorPlan plan = withCommand.getCommand().getProcessorPlan(); QueryProcessor withProcessor = new QueryProcessor(plan, getContext().clone(), root.getBufferManager(), root.getDataManager()); processors.put(withCommand.getGroupSymbol().getName(), new TableProcessor(withProcessor, withCommand.getColumns())); } } this.root.open(); }
union.open();