impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Hecht (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-5890: Abort queries if scanner hits IO errors
Date Tue, 12 Sep 2017 22:16:13 GMT
Dan Hecht has posted comments on this change.

Change subject: IMPALA-5890: Abort queries if scanner hits IO errors

Patch Set 10:

File be/src/exec/

PS10, Line 154: if the scan range has returned eosr before
if that was the case, why can we have !eosr at line 152?

PS10, Line 155: must
why "must"? or do you mean "can't"?

PS10, Line 155: this is the first time the function
              :     // is called 
why is that significant? and why is it okay to have io_buffer_==NULL in that case?

PS10, Line 200: DISK_IO_ERROR
why not INTERNAL_ERROR, since that's the code that indicates an internal error (i.e. bug).

PS10, Line 351:   if (boundary_buffer_bytes_left_ > 0 &&
              :       (output_buffer_pos_ != &boundary_buffer_pos_ ||
              :       output_buffer_bytes_left_ != &boundary_buffer_bytes_left_)) {
              :     return false;
this is effectively a double negative statement, which makes it harder to read.  How about
applying deMorgan's to remove the double negation:

return boundary_buffer_bytes_left_ == 0 ||
   (output_buffer_pos_ == &boundary_buffer_pos_ &&
    output_buffer_bytes_left == &boundary_buffer_bytes_left_);

Alternatively, it may be even easier to read if you just put the DCHECK in there:

if (boundary_buffer_bytes_left_ > 0) {
    DCHECK_EQ(output_buffer_pos_, &boundary_buffer_pos_);
    DCHECK_EQ(output_buffer_bytes_left_, &boundary_buffer_bytes_left_);

(which you could also use at line 228-229).  Also, is there an invariant for the "else" case
w.r.t. io_buffer* that makes sense to check?

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: I44dc95184c241fbcdbdbebad54339530680d3509
Gerrit-PatchSet: 10
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Lars Volker <>
Gerrit-Reviewer: Dan Hecht <>
Gerrit-Reviewer: Joe McDonnell <>
Gerrit-Reviewer: Lars Volker <>
Gerrit-Reviewer: Tim Armstrong <>
Gerrit-HasComments: Yes

View raw message