}
@Override
public Void visitWindow(WindowNode node, Void context)
{
PlanNode source = node.getSource();
source.accept(this, context); // visit child
verifyUniqueId(node);
Preconditions.checkArgument(source.getOutputSymbols().containsAll(node.getPartitionBy()), "Invalid node. Partition by symbols (%s) not in source plan output (%s)", node.getPartitionBy(), node.getSource().getOutputSymbols());
Preconditions.checkArgument(source.getOutputSymbols().containsAll(node.getOrderBy()), "Invalid node. Order by symbols (%s) not in source plan output (%s)", node.getOrderBy(), node.getSource().getOutputSymbols());
for (FunctionCall call : node.getWindowFunctions().values()) {
Set<Symbol> dependencies = DependencyExtractor.extractUnique(call);
Preconditions.checkArgument(source.getOutputSymbols().containsAll(dependencies), "Invalid node. Window function dependencies (%s) not in source plan output (%s)", dependencies, node.getSource().getOutputSymbols());
}
return null;
}