docs: private void placeTVEsForOrderby(
              Map<AbstractExpression, Integer> aggTableIndexMap,
              Map<Integer, ParsedColInfo> indexToColumnMap) {
          // Detect the edge order by case
          detectComplexOrderby();
  
          if (isComplexOrderBy()) {
              // Case that ORDER BY is below Projection node
              boolean replaceAll = hasComplexAgg() || hasComplexGroupby();
              for (ParsedColInfo orderCol : m_orderColumns) {
                  AbstractExpression expr = orderCol.m_expression;
                  if (replaceAll ||
                          expr.hasAnySubexpressionOfClass(AggregateExpression.class)) {
                      orderCol.m_expression = expr.replaceWithTVE(aggTableIndexMap, indexToColumnMap);
                  }
              }
          }
          else if (hasAggregateOrGroupby()) {
              // Case that ORDER BY is above Projection node
  
              Map<AbstractExpression, Integer> displayIndexMap = new HashMap<>();
              Map<Integer, ParsedColInfo> displayIndexToColumnMap = new HashMap<>();
  
              int orderByIndex = 0;
              for (ParsedColInfo col : m_displayColumns) {
                  displayIndexMap.put(col.m_expression, orderByIndex);
                  assert(col.m_alias != null);
                  displayIndexToColumnMap.put(orderByIndex, col);
                  orderByIndex++;
              }
  
              // place the TVEs from Display columns in the ORDER BY expression
              for (ParsedColInfo orderCol : m_orderColumns) {
                  AbstractExpression expr = orderCol.m_expression;
                  expr = expr.replaceWithTVE(displayIndexMap, displayIndexToColumnMap);
                  orderCol.m_expression = expr;
              }
          }
          // other cases like (2) from the function comments.
      }