Tim Armstrong has posted comments on this change.

Change subject: IMPALA-3308: Get expr-test passing on PPC64LE
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/4186/3/be/src/exprs/expr-value.h
File be/src/exprs/expr-value.h:

PS3, Line 73:     string_val.ptr = const_cast<char*>(string_data.data());
> Does this have the possibility of creating Undefined Behavior?
The c++11 standard guarantees that string storage is contiguous. Should be fine 
as long as the string isn't modified later.

Let's change this to string_val.ptr = &string_data[0] to avoid the const_cast.


-- 
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: 3
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: segelyang <zhiz...@cn.ibm.com>
Gerrit-Reviewer: Jim Apple <jbap...@cloudera.com>
Gerrit-Reviewer: Lars Volker <l...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com>
Gerrit-Reviewer: segelyang <zhiz...@cn.ibm.com>
Gerrit-HasComments: Yes

Reply via email to