Tim Armstrong has posted comments on this change. Change subject: IMPALA-3308: Get expr-test passing on PPC64LE ......................................................................
Patch Set 1: (1 comment) http://gerrit.cloudera.org:8080/#/c/4186/1/be/src/exprs/literal.cc File be/src/exprs/literal.cc: Line 77: new (&value_) ExprValue(node.string_literal.value); I don't think this is actually a valid use of placement new. It just works by coincidence. Placement new treats the target as a void* and won't run any destructors, so could potentially leak memory depending on the std::string implementation. It would be better to change ExprValue(const std::string& str) to a static init method like ExprValue::Init(const std::string& str) that initializes the object in place. That will be just as simple and more obviously correct. -- To view, visit http://gerrit.cloudera.org:8080/4186 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4504ee6a52a085f530aadfcfa009bacb83c64787 Gerrit-PatchSet: 1 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: segelyang <[email protected]> Gerrit-Reviewer: Lars Volker <[email protected]> Gerrit-Reviewer: Tim Armstrong <[email protected]> Gerrit-HasComments: Yes
