Internal Jenkins has submitted this change and it was merged. Change subject: IMPALA-4452: Always call AggFnEvaluator::Open() before AggFnEvaluator::Init() ......................................................................
IMPALA-4452: Always call AggFnEvaluator::Open() before AggFnEvaluator::Init() As part of the fix for IMPALA-2379, the expression contexts of aggregation function evaluators are expected to be opened before their initFn() are called so \ constant arguments can be accessed in initFn(). However, the legacy aggregation node wasn't updated to follow this order for singleton result tuple (i.e. no group-by). This patch fixes the problem by deferring the creation of the singleton tuple to a point in AggregationNode::Open() after the expression contexts of all aggregate function evaluators have been opened. PartitionedAggregationNode() was already updated to follow this order. This patch also fixes a minor bug in which uninitialized entries of agg_fn_ctxs_[] may be accessed in AggregationNode::Close() if AggregationNode::Prepare() fails. Change-Id: I2f261dee47821c517d8dbe1babf4112462d85807 Reviewed-on: http://gerrit.cloudera.org:8080/5049 Reviewed-by: Michael Ho <k...@cloudera.com> Tested-by: Internal Jenkins --- M be/src/exec/aggregation-node.cc 1 file changed, 19 insertions(+), 16 deletions(-) Approvals: Michael Ho: Looks good to me, approved Internal Jenkins: Verified -- To view, visit http://gerrit.cloudera.org:8080/5049 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2f261dee47821c517d8dbe1babf4112462d85807 Gerrit-PatchSet: 3 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Michael Ho <k...@cloudera.com> Gerrit-Reviewer: Alex Behm <alex.b...@cloudera.com> Gerrit-Reviewer: Dan Hecht <dhe...@cloudera.com> Gerrit-Reviewer: Henry Robinson <he...@cloudera.com> Gerrit-Reviewer: Internal Jenkins Gerrit-Reviewer: Michael Ho <k...@cloudera.com>