impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Tauber-Marshall (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-3742: partitions DMLs for Kudu tables
Date Sat, 18 Mar 2017 00:21:42 GMT
Thomas Tauber-Marshall has posted comments on this change.

Change subject: IMPALA-3742: partitions DMLs for Kudu tables
......................................................................


Patch Set 9:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/6037/8/be/src/runtime/data-stream-partitioner.h
File be/src/runtime/data-stream-partitioner.h:

PS8, Line 62: titions rows by calli
> add some class-level comments here and to the HashPartitioner, e.g. call ou
Done


PS8, Line 71: and passes 
> it sounds like you'll go back to the prev strategy (no lambda), but I'll me
Done


http://gerrit.cloudera.org:8080/#/c/6037/8/be/src/runtime/data-stream-sender.cc
File be/src/runtime/data-stream-sender.cc:

PS8, Line 445:  auto callback = [this, num_channels](TupleRow* row, uint32_t partition) ->
Status {
             :       return this->channels_[partition % num_channels]->AddRow(row);
             :     };
             :     switch (partitioner_->type()) {
             :       case TPartitionType::HASH_PARTITIONED:
             :         RETURN_IF_ERROR(reinterpret_cast<HashStreamPartitioner*>(partitioner_.get())
             :                             ->Partition(batch, callback));
             :         break;
             :       case TPartitionType::KUDU:
             :         RETURN_IF_ERROR(reinterpret_cast<KuduStreamPartitioner*>(partitioner_.get())
             :                             ->Partition(batch, callback));
             :         break;
             :       default:
             :         DCHECK(false) << "inknown partition type.";
             :         const char* str = "UNKNOWN";
             :         auto i = _TPartitionType_VALUES_TO_NAMES.find(partitioner_->type());
             :         if (i 
> I do agree that the lambdas do look verbose here, especially since they're 
Upon further review, and in the interest of making a decision and moving on, I think that
the best tradeoff of performance to readability is to just clean up this solution by removing
the duplication of the lambda.


Line 462:         return Status(strings::Substitute("Partition type $0 not implemented.",
str));
> you can add a dcheck here to crash the process. this shouldn't happen unles
Done


-- 
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: 9
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Thomas Tauber-Marshall <tmarshall@cloudera.com>
Gerrit-Reviewer: Henry Robinson <henry@cloudera.com>
Gerrit-Reviewer: Marcel Kornacker <marcel@cloudera.com>
Gerrit-Reviewer: Matthew Jacobs <mj@cloudera.com>
Gerrit-Reviewer: Thomas Tauber-Marshall <tmarshall@cloudera.com>
Gerrit-HasComments: Yes

Mime
View raw message