IMPALA-549: Failure during Prepare() of TopNNode causes segfault due to NULL ptr access
IMPALA-549: Failure during Prepare() of TopNNode causes segfault due to NULL ptr access

Change-Id: I5756195dcc818db0cbd8a28434363dae93aa77a5
Reviewed-on: http://gerrit.ent.cloudera.com:8080/296
Tested-by: jenkins
Reviewed-by: Henry Robinson <3eca10f30041813f045165784e24b5a950a6cc7e@cloudera.com>

andybab/Impala,lnliuxing/Impala,placrosse/ImpalaToGo,mapr/impala,bowlofstew/Impala,rampage644/impala-cut,XiaominZhang/Impala,scalingdata/Impala,grundprinzip/Impala,brightchen/Impala,kapilrastogi/Impala,theyaa/Impala,caseyching/Impala,cloudera/recordservice,brightchen/Impala,XiaominZhang/Impala,lnliuxing/Impala,ibmsoe/ImpalaPPC,gistic/PublicSpatialImpala,cgvarela/Impala,bowlofstew/Impala,ImpalaToGo/ImpalaToGo,lirui-intel/Impala,scalingdata/Impala,caseyching/Impala,lnliuxing/Impala,gerashegalov/Impala,gerashegalov/Impala,tempbottle/Impala,cchanning/Impala,tempbottle/Impala,bowlofstew/Impala,cchanning/Impala,lnliuxing/Impala,andybab/Impala,kapilrastogi/Impala,AtScaleInc/Impala,brightchen/Impala,rdblue/Impala,lnliuxing/Impala,tempbottle/Impala,caseyching/Impala,andybab/Impala,henryr/Impala,bowlofstew/Impala,cchanning/Impala,henryr/Impala,scalingdata/Impala,gistic/PublicSpatialImpala,bratatidas9/Impala-1,brightchen/Impala,XiaominZhang/Impala,henryr/Impala,tempbottle/Impala,cloudera/recordservice,ibmsoe/ImpalaPPC,rdblue/Impala,bowlofstew/Impala,theyaa/Impala,AtScaleInc/Impala,brightchen/Impala,lnliuxing/Impala,caseyching/Impala,AtScaleInc/Impala,bratatidas9/Impala-1,brightchen/Impala,ImpalaToGo/ImpalaToGo,henryr/Impala,lirui-intel/Impala,scalingdata/Impala,ibmsoe/ImpalaPPC,cchanning/Impala,gistic/PublicSpatialImpala,lirui-intel/Impala,gistic/PublicSpatialImpala,XiaominZhang/Impala,brightchen/Impala,cgvarela/Impala,scalingdata/Impala,placrosse/ImpalaToGo,bratatidas9/Impala-1,cloudera/recordservice,placrosse/ImpalaToGo,cchanning/Impala,gerashegalov/Impala,cgvarela/Impala,grundprinzip/Impala,gistic/PublicSpatialImpala,rdblue/Impala,theyaa/Impala,XiaominZhang/Impala,placrosse/ImpalaToGo,ibmsoe/ImpalaPPC,tempbottle/Impala,rampage644/impala-cut,ibmsoe/ImpalaPPC,bratatidas9/Impala-1,bratatidas9/Impala-1,mapr/impala,bowlofstew/Impala,tempbottle/Impala,AtScaleInc/Impala,bowlofstew/Impala,henryr/Impala,theyaa/Impala,gerashegalov/Impala,cloudera/recordservice,rampage644/impala-cut,kapilrastogi/Impala,rdblue/Impala,lirui-intel/Impala,lnliuxing/Impala,grundprinzip/Impala,XiaominZhang/Impala,cgvarela/Impala,ImpalaToGo/ImpalaToGo,grundprinzip/Impala,rampage644/impala-cut,theyaa/Impala,lirui-intel/Impala,andybab/Impala,rampage644/impala-cut,henryr/Impala,scalingdata/Impala,andybab/Impala,cchanning/Impala,gerashegalov/Impala,lirui-intel/Impala,caseyching/Impala,XiaominZhang/Impala,rdblue/Impala,cgvarela/Impala,bratatidas9/Impala-1,cgvarela/Impala,rampage644/impala-cut,lirui-intel/Impala,rdblue/Impala,andybab/Impala,AtScaleInc/Impala,mapr/impala,cgvarela/Impala,ImpalaToGo/ImpalaToGo,tempbottle/Impala,ibmsoe/ImpalaPPC,grundprinzip/Impala,rdblue/Impala,theyaa/Impala,cloudera/recordservice,cloudera/recordservice,theyaa/Impala,gerashegalov/Impala,mapr/impala,ImpalaToGo/ImpalaToGo,AtScaleInc/Impala,grundprinzip/Impala,kapilrastogi/Impala,kapilrastogi/Impala,kapilrastogi/Impala,gerashegalov/Impala,bratatidas9/Impala-1,ImpalaToGo/ImpalaToGo,ibmsoe/ImpalaPPC,gistic/PublicSpatialImpala,caseyching/Impala,placrosse/ImpalaToGo,kapilrastogi/Impala,cchanning/Impala,placrosse/ImpalaToGo,cloudera/recordservice,caseyching/Impala,mapr/impala