Henry Robinson has posted comments on this change. Change subject: IMPALA-3742: partitions DMLs for Kudu tables ......................................................................
Patch Set 6: (1 comment) http://gerrit.cloudera.org:8080/#/c/6037/6/be/src/runtime/data-stream-sender.cc File be/src/runtime/data-stream-sender.cc: PS6, Line 446: TupleRow* current_row = batch->GetRow(i); : uint32_t partition; : RETURN_IF_ERROR(partitioner_->Partition(current_row, &partition)); : RETURN_IF_ERROR(channels_[partition % num_channels]->AddRow(current_row)); > Henry, would you be opposed to #2 above? It would avoid iterating over the rather than pass in the channels (which aren't really an interface I'd expose any other classes to), maybe use a callback: template <typename T> Status Partitioner::Partition(RowBatch* row, const T& cb); RETURN_IF_ERROR(partitioner_->Partition(batch, [this, num_channels] -> Status(TupleRow* row, int32_t partition) { return this->channels_[partition % num_channels]->AddRow(row); }); -- To view, visit http://gerrit.cloudera.org:8080/6037 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic10b3295159354888efcde3df76b0edb24161515 Gerrit-PatchSet: 6 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Thomas Tauber-Marshall <[email protected]> Gerrit-Reviewer: Henry Robinson <[email protected]> Gerrit-Reviewer: Marcel Kornacker <[email protected]> Gerrit-Reviewer: Matthew Jacobs <[email protected]> Gerrit-Reviewer: Thomas Tauber-Marshall <[email protected]> Gerrit-HasComments: Yes
