Matthew Jacobs has posted comments on this change. Change subject: IMPALA-5611: KuduPartitionExpr holds onto memory unnecessarily ......................................................................
Patch Set 1: (2 comments) http://gerrit.cloudera.org:8080/#/c/7346/1/be/src/exprs/kudu-partition-expr.cc File be/src/exprs/kudu-partition-expr.cc: Line 87: eval->FreeLocalAllocations(); > Two problems I see with that: 1. I don't understand the concern about where to get it? This class is already a ScalarExpr sublass, so you can call ScalarExprEvaluator::FreeLocalAllocations(e). See my comment in DSS about the code to write. If you're concerned about freeing the child expr memory, take a look at how the ScalarExprEvaluator creation works. You'll see in DSS prepare we call Create(), the function contexts get created there. Those are what ScalarExprEvaluator::FreeLocalAllocations(e) iterates over. 2. The sort should already be freeing local allocations, should be easy to tell by looking at the memory in the profile. http://gerrit.cloudera.org:8080/#/c/7346/2/be/src/runtime/data-stream-sender.cc File be/src/runtime/data-stream-sender.cc: Line 456: } you can just call ScalarExprEvaluator::FreeLocalAllocations(partition_expr_evals_); -- To view, visit http://gerrit.cloudera.org:8080/7346 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia661eb8bed114070728a1497ccf7ed6893237e5e Gerrit-PatchSet: 1 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Thomas Tauber-Marshall <tmarsh...@cloudera.com> Gerrit-Reviewer: Matthew Jacobs <m...@cloudera.com> Gerrit-Reviewer: Thomas Tauber-Marshall <tmarsh...@cloudera.com> Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com> Gerrit-HasComments: Yes