impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Apple (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-5031: Remove undefined behavior "reference binding to null"
Date Sat, 03 Jun 2017 15:01:47 GMT
Jim Apple has posted comments on this change.

Change subject: IMPALA-5031: Remove undefined behavior "reference binding to null"

Patch Set 3:

Commit Message:

Line 22: 
> You could add a link to
File be/src/exec/

Line 379: ,
> Do you want to fix the line wrapping while you're here?
File be/src/exec/

Line 301:     // Load /
> I'm not sure that the replacement preserves the comment well. Do you know w
I think this is the same meaning as in the other codegen earlier in this patch that Tim responded
to you about.
File be/src/exec/parquet-column-stats.inline.h:

Line 75:       v, bytes_needed, reinterpret_cast<uint8_t*>(&(*out)[0]));
> Out cannot be empty here, but the code looks suspicious. Should we change i
data() returns a const pointer for strings until C++17, but the other two places I changed.

For here, I added a conditional guard to make sure we don't hit the UB.
File be/src/exprs/expr-value.h:

Line 72:     string_val.ptr = string_val.len > 0 ? &string_data[0] : nullptr;
> Nice. Does this get us around the const cast?
Yes - data() returns a const char * (until c++17), but string_val.ptr is a char *.
File be/src/util/

Line 127:   queue.Enqueue(;
> These aren't necessary because of the resize aboveand inconsistent with usi

Line 194:   queue.Enqueue(;
> Revert this one? It's not necessary and inconsistent with the lines immedia

Line 202:   queue.Enqueue(;
> Same here.

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifef5c3de686318bff4eac7dfad6e1639ddadb8f2
Gerrit-PatchSet: 3
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Jim Apple <>
Gerrit-Reviewer: Dan Hecht <>
Gerrit-Reviewer: Jim Apple <>
Gerrit-Reviewer: Lars Volker <>
Gerrit-Reviewer: Tim Armstrong <>
Gerrit-HasComments: Yes

View raw message