SubqueryFlattener { public DMLStatementNode flatten(DMLStatementNode stmt) throws StandardException { ResultSetNode resultSet = stmt.getResultSetNode(); if (resultSet.getNodeType() == NodeTypes.SELECT_NODE) { selectStack = new Stack<>(); currentSelectNode = null; selectNode((SelectNode)resultSet, stmt); } return stmt; } SubqueryFlattener(SQLParserContext parserContext); DMLStatementNode flatten(DMLStatementNode stmt); static boolean isAggregateMethod(Visitable node);  }
@Test public void testFlatten() throws Exception { generateAndCheckResult(); }