diff -crN '--exclude=.git' '--exclude=.gitee' openGauss-server-2.1.0/src/bin/pg_basebackup/pg_basebackup.cpp openGauss-server-2.1.0-edit/src/bin/pg_basebackup/pg_basebackup.cpp
*** openGauss-server-2.1.0/src/bin/pg_basebackup/pg_basebackup.cpp	2021-12-13 16:23:09.000000000 +0800
--- openGauss-server-2.1.0-edit/src/bin/pg_basebackup/pg_basebackup.cpp	2023-08-14 10:19:02.650301090 +0800
***************
*** 1584,1590 ****
      struct dirent* ent;
      while (1) {
          ent = readdir(dir);
!         if (ent <= 0) {
              break;
          }
          if ((strcmp(".", ent->d_name) == 0) || (strcmp("..", ent->d_name) == 0)) {
--- 1584,1590 ----
      struct dirent* ent;
      while (1) {
          ent = readdir(dir);
!         if (ent == NULL) {
              break;
          }
          if ((strcmp(".", ent->d_name) == 0) || (strcmp("..", ent->d_name) == 0)) {
diff -crN '--exclude=.git' '--exclude=.gitee' openGauss-server-2.1.0/src/gausskernel/runtime/opfusion/opfusion_util.cpp openGauss-server-2.1.0-edit/src/gausskernel/runtime/opfusion/opfusion_util.cpp
*** openGauss-server-2.1.0/src/gausskernel/runtime/opfusion/opfusion_util.cpp	2021-12-13 16:23:09.000000000 +0800
--- openGauss-server-2.1.0-edit/src/gausskernel/runtime/opfusion/opfusion_util.cpp	2023-08-14 10:18:07.476105895 +0800
***************
*** 405,411 ****
  
      /* check whether to have order by */
      if (node->aggstrategy != AGG_PLAIN ||
!             node->groupingSets > 0) {
          return NOBYPASS_NOT_PLAIN_AGG;
      }
  
--- 405,411 ----
  
      /* check whether to have order by */
      if (node->aggstrategy != AGG_PLAIN ||
!             node->groupingSets != NIL) {
          return NOBYPASS_NOT_PLAIN_AGG;
      }
  
