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 2020/05/21 19:56:30 UTC

[GitHub] [arrow] fsaintjacques commented on a change in pull request #7244: PARQUET-1855: [C++] Improve parquet *MetaData documentation

fsaintjacques commented on a change in pull request #7244:
URL: https://github.com/apache/arrow/pull/7244#discussion_r428879824



##########
File path: cpp/src/parquet/metadata.h
##########
@@ -178,27 +179,42 @@ class PARQUET_EXPORT ColumnChunkMetaData {
   std::unique_ptr<ColumnChunkMetaDataImpl> impl_;
 };
 
+/// \brief RowGroupMetaData is a proxy around format::RowGroupMetaData.
 class PARQUET_EXPORT RowGroupMetaData {
  public:
-  // API convenience to get a MetaData accessor
+  /// \brief Create a RowGroupMetaData from a serialized thrift message.
   static std::unique_ptr<RowGroupMetaData> Make(
       const void* metadata, const SchemaDescriptor* schema,
       const ApplicationVersion* writer_version = NULLPTR,
       std::shared_ptr<InternalFileDecryptor> file_decryptor = NULLPTR);
 
   ~RowGroupMetaData();
 
-  // row-group metadata
+  /// \brief The number of columns in this row group. The order must match the
+  /// parent's column ordering.
   int num_columns() const;
+
+  /// \brief Return the ColumnChunkMetaData of the corresponding column ordinal.
+  ///
+  /// WARNING, the returned object references memory location in it's parent
+  /// (RowGroupMetaData) object. Hence, the parent must outlive the returned
+  /// object.
+  ///
+  /// \param[i] index of the ColumnChunkMetaData to retrieve.
+  ///
+  /// \throws ParquetException if the index is out of bound.
+  std::unique_ptr<ColumnChunkMetaData> ColumnChunk(int i) const;

Review comment:
       @wesm I believe we should make a breaking change and return either a const-ref or const-ptr (like SchemaDescriptor) and hold the corresponding ColumnChunks in a private vector.




----------------------------------------------------------------
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