docs: private AbstractPlanNode handleDistinctWithGroupby(AbstractPlanNode root) {
          if (! m_parsedSelect.hasDistinctWithGroupBy()) {
              return root;
          }
  
          assert(m_parsedSelect.isGrouped());
  
          // DISTINCT is redundant with GROUP BY IFF
          // all of the grouping columns are present in the display columns.
          if (m_parsedSelect.displayColumnsContainAllGroupByColumns()) {
              return root;
          }
  
          // Now non complex aggregation cases are handled already
          assert(m_parsedSelect.hasComplexAgg());
  
          AggregatePlanNode distinctAggNode = new HashAggregatePlanNode();
          distinctAggNode.setOutputSchema(m_parsedSelect.getDistinctProjectionSchema());
  
          for (ParsedColInfo col : m_parsedSelect.distinctGroupByColumns()) {
              distinctAggNode.addGroupByExpression(col.m_expression);
          }
  
          // TODO(xin): push down the DISTINCT for certain cases
          // Ticket: ENG-7360
          /*
          boolean pushedDown = false;
          boolean canPushdownDistinctAgg =
                  m_parsedSelect.hasPartitionColumnInDistinctGroupby();
          //
          // disable pushdown, DISTINCT push down turns out complex
          //
          canPushdownDistinctAgg = false;
  
          if (canPushdownDistinctAgg && !m_parsedSelect.m_mvFixInfo.needed()) {
              assert(m_parsedSelect.hasPartitionColumnInGroupby());
              AbstractPlanNode receive = root;
  
              if (receive instanceof ReceivePlanNode) {
                  // Temporarily strip send/receive pair
                  AbstractPlanNode distNode = receive.getChild(0).getChild(0);
                  receive.getChild(0).unlinkChild(distNode);
  
                  distinctAggNode.addAndLinkChild(distNode);
                  receive.getChild(0).addAndLinkChild(distinctAggNode);
  
                  pushedDown = true;
              }
          }*/
  
          distinctAggNode.addAndLinkChild(root);
          root = distinctAggNode;
  
          return root;
      }