From e62ec62e40b04b0bfce76d58369845d3aa96a419 Mon Sep 17 00:00:00 2001 From: Eero Lihavainen Date: Wed, 8 Nov 2023 08:32:32 +0200 Subject: [PATCH] GH-38591: [Parquet][C++] Remove redundant open calls in `ParquetFileFormat::GetReaderAsync` (#38621) ### Rationale for this change There were duplicate method calls causing extra I/O operations, apparently unintentional from https://github.com/apache/arrow/commit/0793432ad0ef5cb598b7b1e61071cd4991bd1b8b. ### What changes are included in this PR? Remove the extra method calls. ### Are these changes tested? ### Are there any user-facing changes? * Closes: #38591 Authored-by: Eero Lihavainen Signed-off-by: mwish --- cpp/src/arrow/dataset/file_parquet.cc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/cpp/src/arrow/dataset/file_parquet.cc b/cpp/src/arrow/dataset/file_parquet.cc index d486f194f38a3..65ad70181f28a 100644 --- a/cpp/src/arrow/dataset/file_parquet.cc +++ b/cpp/src/arrow/dataset/file_parquet.cc @@ -504,11 +504,6 @@ Future> ParquetFileFormat::GetReader default_fragment_scan_options)); auto properties = MakeReaderProperties(*this, parquet_scan_options.get(), source.path(), source.filesystem(), options->pool); - ARROW_ASSIGN_OR_RAISE(auto input, source.Open()); - // TODO(ARROW-12259): workaround since we have Future<(move-only type)> - auto reader_fut = parquet::ParquetFileReader::OpenAsync( - std::move(input), std::move(properties), metadata); - auto path = source.path(); auto self = checked_pointer_cast(shared_from_this()); return source.OpenAsync().Then(