This is an automated email from the ASF dual-hosted git repository. adar pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/kudu.git
commit 9f382f7aefb6a66a6962b0bdc4509f530975c56e Author: Todd Lipcon <[email protected]> AuthorDate: Mon Mar 2 23:10:51 2020 -0800 client: avoid an extra construction of ColumnSchema KuduSchema::Column() was making an unnecessary copy of a ColumnSchema object, when it instead could just use a local reference. This showed up in my TSBS benchmark as an easily-addressed waste of CPU cycles. Change-Id: I695d760837fb529a549e83b5385a1df79f358697 Reviewed-on: http://gerrit.cloudera.org:8080/15501 Reviewed-by: Andrew Wong <[email protected]> Reviewed-by: Bankim Bhavsar <[email protected]> Reviewed-by: Adar Dembo <[email protected]> Reviewed-by: Alexey Serbin <[email protected]> Tested-by: Todd Lipcon <[email protected]> --- src/kudu/client/schema.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kudu/client/schema.cc b/src/kudu/client/schema.cc index 1a9ea4c..24cab91 100644 --- a/src/kudu/client/schema.cc +++ b/src/kudu/client/schema.cc @@ -859,7 +859,7 @@ bool KuduSchema::Equals(const KuduSchema& other) const { } KuduColumnSchema KuduSchema::Column(size_t idx) const { - ColumnSchema col(schema_->column(idx)); + const ColumnSchema& col = schema_->column(idx); #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" KuduColumnStorageAttributes attrs(FromInternalEncodingType(col.attributes().encoding),
