impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Impala Public Jenkins (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-4747: macros should only evaluate their arguments once
Date Thu, 12 Jan 2017 05:42:42 GMT
Impala Public Jenkins has submitted this change and it was merged.

Change subject: IMPALA-4747: macros should only evaluate their arguments once
......................................................................


IMPALA-4747: macros should only evaluate their arguments once

The way the macros were previously written, they expanded
so that the 'status' expression was duplicated. This means
if the expression has side-effects, they happen twice.
The fix is to introduce a temporary variable.

Change-Id: I1229849150d3f747e6780cc072ba063152ade1a9
Reviewed-on: http://gerrit.cloudera.org:8080/5686
Reviewed-by: Matthew Jacobs <mj@cloudera.com>
Reviewed-by: Henry Robinson <henry@cloudera.com>
Tested-by: Impala Public Jenkins
---
M be/src/exec/hash-table-test.cc
M be/src/runtime/buffered-tuple-stream-test.cc
M be/src/runtime/tmp-file-mgr-test.cc
M be/src/testutil/gtest-util.h
4 files changed, 20 insertions(+), 6 deletions(-)

Approvals:
  Impala Public Jenkins: Verified
  Henry Robinson: Looks good to me, approved
  Matthew Jacobs: Looks good to me, but someone else must approve



-- 
To view, visit http://gerrit.cloudera.org:8080/5686
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I1229849150d3f747e6780cc072ba063152ade1a9
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tim Armstrong <tarmstrong@cloudera.com>
Gerrit-Reviewer: Henry Robinson <henry@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins
Gerrit-Reviewer: Matthew Jacobs <mj@cloudera.com>
Gerrit-Reviewer: Sailesh Mukil <sailesh@cloudera.com>

Mime
View raw message