private void discoverWith( LinkedHashMap<String, WithQueryCommand> pushdownWith, Command command, List<WithQueryCommand> with, Collection<GroupSymbol> groups) throws QueryMetadataException, TeiidComponentException { for (GroupSymbol groupSymbol : groups) { if (!groupSymbol.isPushedCommonTable()) { continue; } WithQueryCommand clause = pushdownWith.get(groupSymbol.getNonCorrelationName()); if (clause == null) { continue; } TreeSet<GroupSymbol> temp = new TreeSet<GroupSymbol>(nonCorrelatedComparator); GroupCollectorVisitor.getGroupsIgnoreInlineViewsAndEvaluatableSubqueries(clause.getCommand(), temp); temp.removeAll(this.withGroups); discoverWith(pushdownWith, command, with, temp); with.add(clause.clone()); this.withGroups.add(clause.getGroupSymbol()); command.setSourceHint(SourceHint.combine(command.getSourceHint(), clause.getCommand().getSourceHint())); } }
private void discoverWith( LinkedHashMap<String, WithQueryCommand> pushdownWith, Command command, List<WithQueryCommand> with, Collection<GroupSymbol> groups) throws QueryMetadataException, TeiidComponentException { for (GroupSymbol groupSymbol : groups) { if (!groupSymbol.isPushedCommonTable()) { continue; } WithQueryCommand clause = pushdownWith.get(groupSymbol.getNonCorrelationName()); if (clause == null) { continue; } TreeSet<GroupSymbol> temp = new TreeSet<GroupSymbol>(nonCorrelatedComparator); GroupCollectorVisitor.getGroupsIgnoreInlineViewsAndEvaluatableSubqueries(clause.getCommand(), temp); temp.removeAll(this.withGroups); discoverWith(pushdownWith, command, with, temp); with.add(clause.clone()); this.withGroups.add(clause.getGroupSymbol()); command.setSourceHint(SourceHint.combine(command.getSourceHint(), clause.getCommand().getSourceHint())); } }
private void discoverWith( LinkedHashMap<String, WithQueryCommand> pushdownWith, Command command, List<WithQueryCommand> with, Collection<GroupSymbol> groups) throws QueryMetadataException, TeiidComponentException { for (GroupSymbol groupSymbol : groups) { if (!groupSymbol.isPushedCommonTable()) { continue; } WithQueryCommand clause = pushdownWith.get(groupSymbol.getNonCorrelationName()); if (clause == null) { continue; } TreeSet<GroupSymbol> temp = new TreeSet<GroupSymbol>(nonCorrelatedComparator); GroupCollectorVisitor.getGroupsIgnoreInlineViewsAndEvaluatableSubqueries(clause.getCommand(), temp); temp.removeAll(this.withGroups); discoverWith(pushdownWith, command, with, temp); with.add(clause.clone()); this.withGroups.add(clause.getGroupSymbol()); command.setSourceHint(SourceHint.combine(command.getSourceHint(), clause.getCommand().getSourceHint())); } }