use of org.teiid.query.processor.relational.DependentAccessNode in project teiid by teiid.
the class TestDependentJoins method getDependentGroups.
static void getDependentGroups(RelationalNode node, Set<String> depGroups, boolean depdenent) {
if (node instanceof AccessNode) {
if (node instanceof DependentAccessNode) {
if (!depdenent) {
return;
}
} else if (depdenent) {
return;
}
AccessNode accessNode = (AccessNode) node;
Command depCommand = accessNode.getCommand();
Collection<GroupSymbol> groupSymbols = GroupCollectorVisitor.getGroups(depCommand, true);
for (GroupSymbol groupSymbol : groupSymbols) {
depGroups.add(groupSymbol.getNonCorrelationName().toUpperCase());
}
}
// Recurse through children
RelationalNode[] children = node.getChildren();
for (int i = 0; i < children.length; i++) {
if (children[i] != null) {
getDependentGroups(node.getChildren()[i], depGroups, depdenent);
}
}
}
Aggregations