Skip to content

Commit

Permalink
GH-38591: [Parquet][C++] Remove redundant open calls in `ParquetFileF…
Browse files Browse the repository at this point in the history
…ormat::GetReaderAsync` (#38621)

### Rationale for this change
There were duplicate method calls causing extra I/O operations, apparently unintentional from 0793432.

### 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 <eero.lihavainen@nitor.com>
Signed-off-by: mwish <maplewish117@gmail.com>
  • Loading branch information
eeroel committed Nov 8, 2023
1 parent bbb610e commit e62ec62
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions cpp/src/arrow/dataset/file_parquet.cc
Original file line number Diff line number Diff line change
Expand Up @@ -504,11 +504,6 @@ Future<std::shared_ptr<parquet::arrow::FileReader>> 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<const ParquetFileFormat>(shared_from_this());

return source.OpenAsync().Then(
Expand Down

0 comments on commit e62ec62

Please sign in to comment.