PartitionedAgg: consider agg fn pool when choosing partition to spill
PartitionedAgg: consider agg fn pool when choosing partition to spill

When there's memory pressure in PartitionedAggregationNode, we spill
the partition that will release the most memory. However, we weren't
counting the aggregate function's mempool when calculating the largest
partition. This mempool stores intermediate string data, which grows
with the size of the hash table, and is freed when the partition is
spilled.

Change-Id: Ia09beb33e19eecf35446fcf2fa2e4c237a664ec5
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/5292
Reviewed-by: Nong Li <99a5e5f8f5911755b88e0b536d46aafa102bed41@cloudera.com>
Tested-by: jenkins
(cherry picked from commit c4c89bbe1d8775d7a1e99445c0137aac30863a83)
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/5321
Reviewed-by: Skye Wanderman-Milne <6d4b168ab637b0a20cc9dbf96abb2537f372f946@cloudera.com>

XiaominZhang/Impala,cloudera/recordservice,grundprinzip/Impala,ImpalaToGo/ImpalaToGo,bowlofstew/Impala,lirui-intel/Impala,bratatidas9/Impala-1,cgvarela/Impala,brightchen/Impala,rdblue/Impala,tempbottle/Impala,henryr/Impala,ImpalaToGo/ImpalaToGo,scalingdata/Impala,lirui-intel/Impala,theyaa/Impala,placrosse/ImpalaToGo,kapilrastogi/Impala,placrosse/ImpalaToGo,rdblue/Impala,bowlofstew/Impala,theyaa/Impala,kapilrastogi/Impala,theyaa/Impala,tempbottle/Impala,tempbottle/Impala,scalingdata/Impala,lnliuxing/Impala,kapilrastogi/Impala,brightchen/Impala,bratatidas9/Impala-1,rdblue/Impala,caseyching/Impala,grundprinzip/Impala,placrosse/ImpalaToGo,gerashegalov/Impala,ImpalaToGo/ImpalaToGo,cchanning/Impala,tempbottle/Impala,XiaominZhang/Impala,grundprinzip/Impala,rdblue/Impala,cgvarela/Impala,placrosse/ImpalaToGo,henryr/Impala,lnliuxing/Impala,cgvarela/Impala,scalingdata/Impala,cloudera/recordservice,grundprinzip/Impala,cchanning/Impala,cchanning/Impala,henryr/Impala,cgvarela/Impala,XiaominZhang/Impala,bratatidas9/Impala-1,grundprinzip/Impala,tempbottle/Impala,lnliuxing/Impala,caseyching/Impala,scalingdata/Impala,rdblue/Impala,cchanning/Impala,brightchen/Impala,cgvarela/Impala,brightchen/Impala,bowlofstew/Impala,henryr/Impala,brightchen/Impala,scalingdata/Impala,XiaominZhang/Impala,gerashegalov/Impala,theyaa/Impala,henryr/Impala,placrosse/ImpalaToGo,cchanning/Impala,lirui-intel/Impala,caseyching/Impala,theyaa/Impala,kapilrastogi/Impala,gerashegalov/Impala,theyaa/Impala,XiaominZhang/Impala,bowlofstew/Impala,cloudera/recordservice,lirui-intel/Impala,henryr/Impala,gerashegalov/Impala,cloudera/recordservice,kapilrastogi/Impala,cloudera/recordservice,bowlofstew/Impala,bratatidas9/Impala-1,gerashegalov/Impala,bowlofstew/Impala,caseyching/Impala,bowlofstew/Impala,gerashegalov/Impala,bratatidas9/Impala-1,ImpalaToGo/ImpalaToGo,caseyching/Impala,ImpalaToGo/ImpalaToGo,lirui-intel/Impala,lnliuxing/Impala,rdblue/Impala,kapilrastogi/Impala,brightchen/Impala,XiaominZhang/Impala,placrosse/ImpalaToGo,lirui-intel/Impala,cchanning/Impala,lnliuxing/Impala,cchanning/Impala,caseyching/Impala,bratatidas9/Impala-1,tempbottle/Impala,brightchen/Impala,tempbottle/Impala,gerashegalov/Impala,rdblue/Impala,lnliuxing/Impala,scalingdata/Impala,lirui-intel/Impala,caseyching/Impala,XiaominZhang/Impala,theyaa/Impala,cgvarela/Impala,kapilrastogi/Impala,bratatidas9/Impala-1,lnliuxing/Impala,cgvarela/Impala,ImpalaToGo/ImpalaToGo,cloudera/recordservice,cloudera/recordservice,grundprinzip/Impala