You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by we...@apache.org on 2018/09/27 12:19:45 UTC
[arrow] 06/24: PARQUET-807: Allow user to retain ownership of
parquet::FileMetaData.
This is an automated email from the ASF dual-hosted git repository.
wesm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
commit 58ad1a8b68ebdb9034d0ea0150aa068875437467
Author: Wes McKinney <we...@twosigma.com>
AuthorDate: Thu Jan 5 12:19:31 2017 -0500
PARQUET-807: Allow user to retain ownership of parquet::FileMetaData.
Also implements PARQUET-808: opening file with existing metadata object.
This allows a user to create a reader only for the purposes of obtaining the metadata.
Do you all think it's worth having a convenience method for reading the metadata out of a file?
Author: Wes McKinney <we...@twosigma.com>
Closes #213 from wesm/PARQUET-807 and squashes the following commits:
c1b5c7c [Wes McKinney] Use ReadMetaData function in test
d382cca [Wes McKinney] Add note about ARROW-455
05ecd37 [Wes McKinney] Implement/test opening with provided metadata. Do not close Arrow output files automatically
d790bb5 [Wes McKinney] Tweak
0dd4184 [Wes McKinney] Add ReadMetaData convenience method
97527ba [Wes McKinney] Change FileMetaData in ParquetFileReader to a shared_ptr so that ownership can be transferred away
Change-Id: Ic76c48671b41816d3dc1ebb736eb5a06c907c95d
---
cpp/examples/parquet/reader-writer.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cpp/examples/parquet/reader-writer.cc b/cpp/examples/parquet/reader-writer.cc
index 0289eed..59ee63b 100644
--- a/cpp/examples/parquet/reader-writer.cc
+++ b/cpp/examples/parquet/reader-writer.cc
@@ -226,7 +226,7 @@ int main(int argc, char** argv) {
std::unique_ptr<parquet::ParquetFileReader> parquet_reader =
parquet::ParquetFileReader::OpenFile(PARQUET_FILENAME, false);
// Get the File MetaData
- const parquet::FileMetaData* file_metadata = parquet_reader->metadata();
+ std::shared_ptr<parquet::FileMetaData> file_metadata = parquet_reader->metadata();
// Get the number of RowGroups
int num_row_groups = file_metadata->num_row_groups();