You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ks...@apache.org on 2020/04/20 19:21:50 UTC
[arrow] 08/28: PARQUET-1843: [C++] Drop duplicated assignment
This is an automated email from the ASF dual-hosted git repository.
kszucs pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
commit c34fa08535165177923b328acf70f51b83e53302
Author: Kazuaki Ishizaki <is...@jp.ibm.com>
AuthorDate: Fri Apr 17 12:04:49 2020 +0900
PARQUET-1843: [C++] Drop duplicated assignment
This PR drops one of the duplicated assignments. While it is functionally correct, it is inefficient.
```
int DecodeIndices(int num_values, arrow::ArrayBuilder* builder) override {
num_values = std::min(num_values, num_values_);
num_values = std::min(num_values, num_values_);
if (num_values > 0) {
```
Closes #6960 from kiszk/PARQUET-1843
Authored-by: Kazuaki Ishizaki <is...@jp.ibm.com>
Signed-off-by: Sutou Kouhei <ko...@clear-code.com>
---
cpp/src/parquet/encoding.cc | 1 -
1 file changed, 1 deletion(-)
diff --git a/cpp/src/parquet/encoding.cc b/cpp/src/parquet/encoding.cc
index f7df986..ec6a3de 100644
--- a/cpp/src/parquet/encoding.cc
+++ b/cpp/src/parquet/encoding.cc
@@ -1554,7 +1554,6 @@ class DictDecoderImpl : public DecoderImpl, virtual public DictDecoder<Type> {
int DecodeIndices(int num_values, arrow::ArrayBuilder* builder) override {
num_values = std::min(num_values, num_values_);
- num_values = std::min(num_values, num_values_);
if (num_values > 0) {
// TODO(wesm): Refactor to batch reads for improved memory use. This is
// relatively simple here because we don't have to do any bookkeeping of