You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/05/04 21:42:39 UTC

[GitHub] [arrow] westonpace commented on a change in pull request #9620: ARROW-11843: [C++] Provide reentrant Parquet reader

westonpace commented on a change in pull request #9620:
URL: https://github.com/apache/arrow/pull/9620#discussion_r626128197



##########
File path: cpp/src/parquet/encryption/read_configurations_test.cc
##########
@@ -237,7 +239,9 @@ TEST_P(TestDecryptionConfiguration, TestDecryption) {
     CheckResults(file_name, decryption_config_num, encryption_config_num);
   }
   // Delete temporary test file.
-  ASSERT_EQ(std::remove(file_name.c_str()), 0);
+  ASSERT_OK_AND_ASSIGN(auto path,

Review comment:
       I don't think this is wrong, I'm just wondering what the reasoning is here for my own education.  Is it to allow paths to be more universal accross platorms?

##########
File path: cpp/src/parquet/file_reader.cc
##########
@@ -563,6 +693,27 @@ std::unique_ptr<ParquetFileReader> ParquetFileReader::OpenFile(
   return Open(std::move(source), props, std::move(metadata));
 }
 
+::arrow::Future<std::unique_ptr<ParquetFileReader>> ParquetFileReader::OpenAsync(
+    std::shared_ptr<::arrow::io::RandomAccessFile> source, const ReaderProperties& props,
+    std::shared_ptr<FileMetaData> metadata) {
+  BEGIN_PARQUET_CATCH_EXCEPTIONS
+  auto fut = SerializedFile::OpenAsync(std::move(source), props, std::move(metadata));
+  auto completed = ::arrow::Future<std::unique_ptr<ParquetFileReader>>::Make();
+  fut.AddCallback([fut, completed](

Review comment:
       Why not use `auto completed = fut.Then`?  Or is this another workaround for ARROW-12259? (in which case maybe add a comment)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org