Michael Ho has uploaded a new change for review. http://gerrit.cloudera.org:8080/5049
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 --- M be/src/exec/aggregation-node.cc 1 file changed, 19 insertions(+), 16 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/49/5049/1 -- To view, visit http://gerrit.cloudera.org:8080/5049 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2f261dee47821c517d8dbe1babf4112462d85807 Gerrit-PatchSet: 1 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Michael Ho <[email protected]>
