docs: public void resolveCorrelations() {
          AbstractParsedStmt subqueryStmt = m_subquery.getSubqueryStmt();
          AbstractParsedStmt parentStmt = subqueryStmt.m_parentStmt;
  
          // we must have a parent - it's a subquery statement
          assert(parentStmt != null);
          // Preserve indexes of all parameters this subquery depends on.
          // It might include parameters from its nested child subqueries that
          // the subquery statement could not resolve itself and had to "move up".
          m_allParameterIdxList.addAll(subqueryStmt.m_parameterTveMap.keySet());
          for (Map.Entry<Integer, AbstractExpression> entry : subqueryStmt.m_parameterTveMap.entrySet()) {
              Integer paramIdx = entry.getKey();
              AbstractExpression expr = entry.getValue();
              if (expr instanceof TupleValueExpression) {
                  TupleValueExpression tve = (TupleValueExpression) expr;
                  if (tve.getOrigStmtId() == parentStmt.getStmtId()) {
                      // TVE originates from the statement that this SubqueryExpression belongs to
                      addArgumentParameter(paramIdx, expr);
                  }
                  else {
                      // TVE originates from a statement above this parent. Move it up.
                      parentStmt.m_parameterTveMap.put(paramIdx, expr);
                  }
              }
              else if (expr instanceof AggregateExpression) {
                  // An aggregate expression is always from THIS parent statement.
                  addArgumentParameter(paramIdx, expr);
              }
              else {
                  // so far it should be either AggregateExpression or TupleValueExpression types
                  assert(false);
              }
          }
          subqueryStmt.m_parameterTveMap.clear();
      }