@Override public void visit(WithQueryCommand obj) { this.commands.add(obj.getCommand()); }
@Override public void visit(WithQueryCommand obj) { this.commands.add(obj.getCommand()); }
@Override public void visit(WithQueryCommand obj) { this.commands.add(obj.getCommand()); }
@Override public void visit(WithQueryCommand obj) { PreOrPostOrderNavigator.doVisit(obj.getCommand(), this, true); } };
private void collectWithCommands(Command command, Collection<Command> commands) { if (command instanceof QueryCommand) { QueryCommand query = (QueryCommand)command; List<WithQueryCommand> with = query.getWith(); if (with != null) { for (WithQueryCommand withQueryCommand : with) { commands.add(withQueryCommand.getCommand()); } } } }
private boolean replaceScalar(WithQueryCommand withQueryCommand) { if (!GroupCollectorVisitor.getGroups(withQueryCommand.getCommand(), false).isEmpty()) { return false; } //if deterministic, just inline return !FunctionCollectorVisitor.isNonDeterministic(withQueryCommand.getCommand()); }
private boolean replaceScalar(WithQueryCommand withQueryCommand) { if (!GroupCollectorVisitor.getGroups(withQueryCommand.getCommand(), false).isEmpty()) { return false; } //if deterministic, just inline return !FunctionCollectorVisitor.isNonDeterministic(withQueryCommand.getCommand()); }
private void collectWithCommands(Command command, Collection<Command> commands) { if (command instanceof QueryCommand) { QueryCommand query = (QueryCommand)command; List<WithQueryCommand> with = query.getWith(); if (with != null) { for (WithQueryCommand withQueryCommand : with) { commands.add(withQueryCommand.getCommand()); } } } }
private boolean replaceScalar(WithQueryCommand withQueryCommand) { if (!GroupCollectorVisitor.getGroups(withQueryCommand.getCommand(), false).isEmpty()) { return false; } //if deterministic, just inline return !FunctionCollectorVisitor.isNonDeterministic(withQueryCommand.getCommand()); }
@Override public void visit(WithQueryCommand obj) { PreOrPostOrderNavigator.doVisit(obj.getCommand(), this, true); } };
@Override public void visit(WithQueryCommand obj) { visitor.createChildNamingContext(false); visitNode(obj.getCommand()); visitor.removeChildNamingContext(); }
@Override public void visit(WithQueryCommand obj) { visitor.createChildNamingContext(false); visitNode(obj.getCommand()); visitor.removeChildNamingContext(); }
@Override public void visit(WithQueryCommand obj) { visitor.createChildNamingContext(false); visitNode(obj.getCommand()); visitor.removeChildNamingContext(); }
@Override public void visit(WithQueryCommand obj) { preVisitVisitor(obj); visitNodes(obj.getColumns()); if (deep) { visitNode(obj.getCommand()); } postVisitVisitor(obj); }
@Override public void visit(WithQueryCommand obj) { preVisitVisitor(obj); visitNodes(obj.getColumns()); if (deep) { visitNode(obj.getCommand()); } postVisitVisitor(obj); }
@Override public void visit(WithQueryCommand obj) { preVisitVisitor(obj); visitNodes(obj.getColumns()); if (deep) { visitNode(obj.getCommand()); } postVisitVisitor(obj); }
/** * @see org.teiid.query.processor.ProcessorPlan#reset() */ public void reset() { super.reset(); this.root.reset(); if (this.with != null) { for (WithQueryCommand withCommand : this.with) { if (withCommand.isRecursive()) { SetQuery setQuery = (SetQuery)withCommand.getCommand(); setQuery.getLeftQuery().getProcessorPlan().reset(); setQuery.getLeftQuery().getProcessorPlan().reset(); } else { withCommand.getCommand().getProcessorPlan().reset(); } } } }
/** * @see org.teiid.query.processor.ProcessorPlan#reset() */ public void reset() { super.reset(); this.root.reset(); if (this.with != null) { for (WithQueryCommand withCommand : this.with) { if (withCommand.isRecursive()) { SetQuery setQuery = (SetQuery)withCommand.getCommand(); setQuery.getLeftQuery().getProcessorPlan().reset(); setQuery.getLeftQuery().getProcessorPlan().reset(); } else { withCommand.getCommand().getProcessorPlan().reset(); } } } }
public RelationalPlan clone(){ RelationalPlan plan = new RelationalPlan((RelationalNode)root.clone()); plan.setOutputElements(outputCols); if (with != null) { List<WithQueryCommand> newWith = LanguageObject.Util.deepClone(this.with, WithQueryCommand.class); for (WithQueryCommand withQueryCommand : newWith) { if (withQueryCommand.isRecursive()) { SetQuery setQuery = (SetQuery)withQueryCommand.getCommand(); setQuery.getLeftQuery().setProcessorPlan(setQuery.getLeftQuery().getProcessorPlan().clone()); setQuery.getRightQuery().setProcessorPlan(setQuery.getRightQuery().getProcessorPlan().clone()); } else { withQueryCommand.getCommand().setProcessorPlan(withQueryCommand.getCommand().getProcessorPlan().clone()); } } plan.setWith(newWith); } return plan; }
public RelationalPlan clone(){ RelationalPlan plan = new RelationalPlan((RelationalNode)root.clone()); plan.setOutputElements(outputCols); if (with != null) { List<WithQueryCommand> newWith = LanguageObject.Util.deepClone(this.with, WithQueryCommand.class); for (WithQueryCommand withQueryCommand : newWith) { if (withQueryCommand.isRecursive()) { SetQuery setQuery = (SetQuery)withQueryCommand.getCommand(); setQuery.getLeftQuery().setProcessorPlan(setQuery.getLeftQuery().getProcessorPlan().clone()); setQuery.getRightQuery().setProcessorPlan(setQuery.getRightQuery().getProcessorPlan().clone()); } else { withQueryCommand.getCommand().setProcessorPlan(withQueryCommand.getCommand().getProcessorPlan().clone()); } } plan.setWith(newWith); } return plan; }