You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@impala.apache.org by "Skye Wanderman-Milne (Code Review)" <ge...@cloudera.org> on 2016/05/02 23:11:06 UTC

[Impala-CR](cdh5-trunk) IMPALA-3311: fix string data coming out of aggs in subplans

Skye Wanderman-Milne has uploaded a new change for review.

  http://gerrit.cloudera.org:8080/2929

Change subject: IMPALA-3311: fix string data coming out of aggs in subplans
......................................................................

IMPALA-3311: fix string data coming out of aggs in subplans

The problem: varlen data (e.g. strings) produced by aggregations is
freed by FreeLocalAllocations() after passing up the output
batch. This works for streaming operators or blocking operators that
copy their input, but results in memory corruption when the output
reaches non-copying blocking operators, e.g. SubplanNode and
NestedLoopJoinNode.

The fix: this patch makes the PartitionedAggregationNode copy out
produced string data if the node is in a subplan. Otherwise it calls
MarkNeedsToReturn() on the output batch. Marking the batch would work
in the subplan case as well, but would likely be less efficient since
it would result in many small batches coming out of the subplan.

The patch includes a test case. However, this test only exposes the
problem with an ASAN build and the --disable_mem_pools flag, which we
don't currently have automated testing for.

Change-Id: Iada891504c261ba54f4eb8c9d7e4e5223668d7b9
---
M be/src/exec/partitioned-aggregation-node.cc
M be/src/exec/partitioned-aggregation-node.h
M be/src/exprs/agg-fn-evaluator.h
M testdata/workloads/functional-query/queries/QueryTest/nested-types-runtime.test
4 files changed, 62 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala refs/changes/29/2929/1
-- 
To view, visit http://gerrit.cloudera.org:8080/2929
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iada891504c261ba54f4eb8c9d7e4e5223668d7b9
Gerrit-PatchSet: 1
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Skye Wanderman-Milne <sk...@cloudera.com>