Fix memory leak in ORCA translator CreateGroupingSetsForRollup() (#11394)
Fix memory leak in ORCA translator CreateGroupingSetsForRollup() (#11394)

Jesse found this memory leak that was introduced in my previous commit
df3ce784285f7d9ceccfa761fd790ece65b65cde.

Adding some notes for how to detect ORCA memory leaks:

Just run ORCA MDP tests should detect memory leaks inside of gporca.
However, the translator code under gpopt is not tested by the MDP tests,
and we by default use GPDB memory contexts in the translator.

One way to detect memory leaks in the ORCA translator code is to set
"optimizer_use_gpdb_allocators=0" in the gpconfig files and run the
relevant queries. By doing that we instead use ORCA memory contexts and
ORCA will be able to detect the memory leaks.

Reported-by: Jesse Zhang <58cb4a1fad2c21afe8ba00106a15922c2987b6b3@gmail.com>
greenplum-db/gpdb,lisakowen/gpdb,adam8157/gpdb,50wu/gpdb,xinzweb/gpdb,50wu/gpdb,greenplum-db/gpdb,xinzweb/gpdb,greenplum-db/gpdb,lisakowen/gpdb,lisakowen/gpdb,lisakowen/gpdb,50wu/gpdb,xinzweb/gpdb,xinzweb/gpdb,adam8157/gpdb,adam8157/gpdb,xinzweb/gpdb,greenplum-db/gpdb,adam8157/gpdb,adam8157/gpdb,greenplum-db/gpdb,xinzweb/gpdb,greenplum-db/gpdb,xinzweb/gpdb,adam8157/gpdb,50wu/gpdb,adam8157/gpdb,lisakowen/gpdb,50wu/gpdb,lisakowen/gpdb,50wu/gpdb,xinzweb/gpdb,adam8157/gpdb,50wu/gpdb,greenplum-db/gpdb,lisakowen/gpdb,lisakowen/gpdb,50wu/gpdb,greenplum-db/gpdb