message: Transform window clauses earlier again: they are handled in the transformer themselves.
diff: @@ -18,6 +18,21 @@ unique_ptr<QueryNode> Transformer::TransformSelectNode(PGSelectStmt *stmt) {
  node = make_unique<SelectNode>();
  auto result = (SelectNode *)node.get();
  + if (stmt->windowClause) {
  + for (auto window_ele = stmt->windowClause->head; window_ele != NULL; window_ele = window_ele->next) {
  + auto window_def = reinterpret_cast<PGWindowDef *>(window_ele->data.ptr_value);
  + D_ASSERT(window_def);
  + D_ASSERT(window_def->name);
  + auto window_name = StringUtil::Lower(string(window_def->name));
  +
  + auto it = window_clauses.find(window_name);
  + if (it != window_clauses.end()) {
  + throw ParserException("window \"%s\" is already defined", window_name);
  + }
  + window_clauses[window_name] = window_def;
  + }
  + }
  +
  // checks distinct clause
  if (stmt->distinctClause != NULL) {
  auto modifier = make_unique<DistinctModifier>();
  @@ -55,21 +70,6 @@ unique_ptr<QueryNode> Transformer::TransformSelectNode(PGSelectStmt *stmt) {
  TransformGroupBy(stmt->groupClause, result->groups);
  // having
  result->having = TransformExpression(stmt->havingClause);
  -
  - if (stmt->windowClause) {
  - for (auto window_ele = stmt->windowClause->head; window_ele != NULL; window_ele = window_ele->next) {
  - auto window_def = reinterpret_cast<PGWindowDef *>(window_ele->data.ptr_value);
  - D_ASSERT(window_def);
  - D_ASSERT(window_def->name);
  - auto window_name = StringUtil::Lower(string(window_def->name));
  -
  - auto it = window_clauses.find(window_name);
  - if (it != window_clauses.end()) {
  - throw ParserException("window \"%s\" is already defined", window_name);
  - }
  - window_clauses[window_name] = window_def;
  - }
  - }
  break;
  }
  case PG_SETOP_UNION:
  