Alex Behm has posted comments on this change.

Change subject: IMPALA-2736: Basic column-wise slot materialization in Parquet 
scanner.
......................................................................


Patch Set 4:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/2779/4/be/src/exec/hdfs-parquet-scanner.cc
File be/src/exec/hdfs-parquet-scanner.cc:

Line 1735:   Tuple** output_row_start = 
reinterpret_cast<Tuple**>(batch_->GetRow(batch_->num_rows()));;
> Why not TupleRow* and TupleRow->SetTuple()? I think that should work the sa
Correct, it works the same.

This seemed easier because I can do ++output_row to move to the next row, but I 
cannot do that directly with a TupleRow*. Also, I can use output_row and 
output_row_start  to easily compute how many rows I populated. The same things 
can be done with a TupleRow* of course, but with some extra casting.

I basically decided to put reinterpret_casts for the filter and conjunct 
evaluations, as opposed to the places where I move to the next row, or compute 
how many rows were added. Either way, some casting needs to be done, and I just 
liked this one better :)

Happy to change it if you prefer the other version.


Line 1735:   Tuple** output_row_start = 
reinterpret_cast<Tuple**>(batch_->GetRow(batch_->num_rows()));;
> Extra ;
Done


Line 1762:     if (output_row == output_row_end) break;
> Does this correctly handle the case where the batch is full? I'm not sure i
Good point. A precondition of this function is that the output batch most not 
be full. It is already DCHECKed in line 1735 in batch_->GetRow(), but I think 
it's clearer to another check in here. Done.


http://gerrit.cloudera.org:8080/#/c/2779/4/be/src/exec/hdfs-parquet-scanner.h
File be/src/exec/hdfs-parquet-scanner.h:

Line 277: /// Top-level tuples:
> Thanks!
Done


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I72a613fa805c542e39df20588fb25c57b5f139aa
Gerrit-PatchSet: 4
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Alex Behm <[email protected]>
Gerrit-Reviewer: Alex Behm <[email protected]>
Gerrit-Reviewer: Mostafa Mokhtar <[email protected]>
Gerrit-Reviewer: Skye Wanderman-Milne <[email protected]>
Gerrit-Reviewer: Tim Armstrong <[email protected]>
Gerrit-HasComments: Yes

Reply via email to