docs: @Override
      public boolean canRunInOneFragment() {
          assert(getScanPartitioning() != null);
          assert(m_subqueryStmt != null);
  
          if (getScanPartitioning().getCountOfPartitionedTables() == 0) {
              return true;
          }
  
          // recursive check for its nested subqueries that require coordination
          // of their results.
          if (failsSingleFragmentTest()) {
              return false;
          }
  
          // Tentative assignment in case of early return.
          // This gets immediately reset if it passes all the tests.
          m_failedSingleFragmentTest = true;
  
          if (m_subqueryStmt instanceof ParsedUnionStmt) {
              // Union are just returned
              return false;
          }
  
          if ( ! (m_subqueryStmt instanceof ParsedSelectStmt)) {
              throw new PlanningErrorException("Unsupported subquery found in FROM clause:" +
                      m_subqueryStmt);
          }
  
          ParsedSelectStmt selectStmt = (ParsedSelectStmt)m_subqueryStmt;
  
          // Now If query has LIMIT/OFFSET/DISTINCT on a replicated table column,
          // we should get rid of the receive node. I (--paul) don't know what this means.
          if (selectStmt.hasLimitOrOffset() || selectStmt.hasDistinctWithGroupBy()) {
              return false;
          }
  
          // If the query uses the partitioned materialized view table with the
          // need to Re-aggregate, then we can not get rid of the receive node.
          // This is also caught in StatementPartitioning when analyzing the join criteria,
          // because it contains a partitioned view that does not have a partition column.
          if (selectStmt.m_mvFixInfo.needed()) {
              return false;
          }
  
          // Table aggregate cases should not get rid of the receive node
          if (selectStmt.hasAggregateOrGroupby()) {
              if (!selectStmt.isGrouped()) {
                  m_tableAggregateSubquery = true;
                  return false;
              }
  
              // For group by queries, there are two cases on group by columns.
              // (1) Does not contain a partition column:
              // If joined with a partitioned table in the parent query, it will
              // violate the partitioned table join criteria.
              // Detect case (1) to mark receive node.
              if ( ! selectStmt.hasPartitionColumnInGroupby()) {
                  return false;
              }
          }
          if ( ! selectStmt.hasPartitionColumnInWindowFunctionExpression()) {
              return false;
          }
  
          // Now. If this sub-query joins with a partitioned table in the parent statement,
          // push the join down by removing the send/receive plan node pair.
          m_failedSingleFragmentTest = false;
          return true;
      }