try {
// Visit the window clauses first; if their types are okay, create a new
// symbol table to use when visiting our sources, that contains the
// window names.
SymbolTable symbolsForSources = new HashSymbolTable(originalSymtab);
List<WindowDef> windowDefs = s.getWindowDefs();
for (WindowDef def : windowDefs) {
def.accept(this);
symbolsForSources.addSymbol(new WindowSymbol(def.getName(), def.getWindowSpec()));
}
mSymTableContext.push(symbolsForSources);
// Now visit the sources, with the symbols for any windows pushed.
SQLStatement source = s.getSource();
visitValidSource(source);
SymbolTable exprTable = mSymTableContext.top();
outTable = new HashSymbolTable(originalSymtab);
// The "stream name" representing this SELECT stmt in the parent
// statement.
String stmtAlias = s.getAlias();
// Nested SELECT statements require an alias.