Csaba Ringhofer has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/14716 )

Change subject: IMPALA-9126: part 2: no hj probe structures in build
......................................................................


Patch Set 5: Code-Review+1

(5 comments)

http://gerrit.cloudera.org:8080/#/c/14716/5/be/src/exec/partitioned-hash-join-builder.h
File be/src/exec/partitioned-hash-join-builder.h:

http://gerrit.cloudera.org:8080/#/c/14716/5/be/src/exec/partitioned-hash-join-builder.h@118
PS5, Line 118:   /// new partitions with level input_partition->leve() + 1. The 
previous hash partitions
typo: missing "l"


http://gerrit.cloudera.org:8080/#/c/14716/5/be/src/exec/partitioned-hash-join-builder.h@329
PS5, Line 329: m
nit: capital M


http://gerrit.cloudera.org:8080/#/c/14716/5/be/src/exec/partitioned-hash-join-builder.h@483
PS5, Line 483:   //
nit: missing /


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

http://gerrit.cloudera.org:8080/#/c/14716/5/be/src/exec/partitioned-hash-join-node.cc@987
PS5, Line 987:   probe_hash_partitions_.resize(PARTITION_FANOUT);
             :   bool have_spilled_hash_partitions = false;
             :   for (int i = 0; i < PARTITION_FANOUT; ++i) {
             :     PhjBuilder::Partition* build_partition = 
builder_->hash_partition(i);
             :     if (build_partition->IsClosed() || 
!build_partition->is_spilled()) continue;
             :     have_spilled_hash_partitions = true;
             :     DCHECK(!probe_streams.empty()) << "Builder should have 
created enough streams";
             :     CreateProbePartition(i, std::move(probe_streams.back()));
             :     probe_streams.pop_back();
             :   }
             :   DCHECK(probe_streams.empty()) << "Builder should not have 
created extra streams";
This loop and AllocateProbeStreams() feel redundant - CreateProbePartition 
doesn't seem to do anything fancy, it just constructs a ProbePartition without 
side effects.

I am not sure about the best way to merge them - maybe CreateProbePartition 
could handle both the allocation and the ProbePartition construction + the 
cleanup on error stuff could be done using the members of 
probe_hash_partitions_.


http://gerrit.cloudera.org:8080/#/c/14716/5/be/src/exec/partitioned-hash-join-node.cc@1055
PS5, Line 1055:   for (auto& stream : *streams) {
              :     stream->Close(nullptr, 
RowBatch::FlushMode::NO_FLUSH_RESOURCES);
              :   }
I would prefer to avoid the gotos by doing cleanup on the caller side or adding 
a wrapper function.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0065f7f44f44f02b7616b1f694178ca42341c42d
Gerrit-Change-Number: 14716
Gerrit-PatchSet: 5
Gerrit-Owner: Tim Armstrong <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Thomas Tauber-Marshall <[email protected]>
Gerrit-Comment-Date: Thu, 21 Nov 2019 18:10:45 +0000
Gerrit-HasComments: Yes

Reply via email to