You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Michal Ostrowski (Code Review)" <ge...@cloudera.org> on 2018/09/11 22:29:14 UTC

[Impala-ASF-CR] IMPALA-2063 Remove newline characters in query status.

Michal Ostrowski has uploaded a new patch set (#2). ( http://gerrit.cloudera.org:8080/11425 )

Change subject: IMPALA-2063 Remove newline characters in query status.
......................................................................

IMPALA-2063 Remove newline characters in query status.

Prior to this change RuntimeProfile::AddInfoStringInternal had "value"
passed by reference.  Subsequently, we needed to conditionally make
a copy of it so as to redact it.  Trimming the trailing newline won't work
on a "const std::string &".  We need a local copy.

Instead of incurring another copy cost, we can instead recover a hidden
existing copy that currently exists in this function - the storage of
the input parameter into the has table.  If instead of using a copy at that
point an std::move operation is used, then we can move the required string
copy to occur at the time "value" is passed into the function.

Hence the "value" parameter can be passed by value, leaving us with a
mutable local copy of the string which we can redact and trim.  Subsequently
the local value is moved to permanent storage.

Change-Id: I2bbd7d7fe2c6d0f3799d0e6b336710bccfef0ab1
---
M be/src/util/runtime-profile.cc
M be/src/util/runtime-profile.h
2 files changed, 19 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/25/11425/2
-- 
To view, visit http://gerrit.cloudera.org:8080/11425
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I2bbd7d7fe2c6d0f3799d0e6b336710bccfef0ab1
Gerrit-Change-Number: 11425
Gerrit-PatchSet: 2
Gerrit-Owner: Michal Ostrowski <mo...@cloudera.com>