Tim Armstrong has posted comments on this change.

Change subject: IMPALA-3286: Prefetching for PHJ probing.
......................................................................


Patch Set 3:

(9 comments)

Did a more detailed pass over the join code.

http://gerrit.cloudera.org:8080/#/c/2959/3/be/src/exec/partitioned-hash-join-node-ir.cc
File be/src/exec/partitioned-hash-join-node-ir.cc:

Line 268:         // 1. No build rows -> Return this row.
Can you comment where condition 1 is handled. It seems to be missing below.


Line 282: BTS
'null_probe_rows_' instead of BTS would be clearer


Line 283:           DCHECK(!status->ok());
I think it would be clearer to return early in the error case, since we don't 
need to worry about preserving state.


Line 306:           DCHECK(skip_row || !status->ok());
The error-case control flow is very mixed up with the non-error control flow.

I think it would be clearer to return early in the error case, since we don't 
need to worry about keeping the state consistent for the next row.

Then skip_row can just be true on the branch, and you can check the result of 
"AppendRow()" directly.


Line 318:     // Finished this batch.
Comment is redundant (implied by the AtEnd() condition). Maybe "At end of 
batch. There is no current probe row."


Line 377:     // Evaluate and hash more rows if ht_ctx is empty.
This is a little weird. It seems like if we  have a half-finished prefetch 
group we prefetch the current iterator, but not the remaining rows in the 
prefetch group.

Am I misunderstanding?


Line 398: process
"to process in the current batch."


Line 417: int PartitionedHashJoinNode::ProcessProbeBatch(
Tangential comment: this function is only used when interpreting and doesn't 
need to be cross-compiled as far as I can see


Line 455: BufferedTupleStream
Not sure if you'll keep this argument, but you can make it:
BufferedTupleStream* __restrict__ build_rows[PARTITION_FANOUT]

We do that in the agg in a similar situation.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib42b93d99d09c833571e39d20d58c11ef73f3cc0
Gerrit-PatchSet: 3
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Michael Ho <[email protected]>
Gerrit-Reviewer: Dan Hecht <[email protected]>
Gerrit-Reviewer: Michael Ho <[email protected]>
Gerrit-Reviewer: Mostafa Mokhtar <[email protected]>
Gerrit-Reviewer: Tim Armstrong <[email protected]>
Gerrit-HasComments: Yes

Reply via email to