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 2022/04/18 16:38:18 UTC

[GitHub] [arrow] pitrou commented on a diff in pull request #12812: ARROW-16131 [C++] support saving and retrieving custom metadata in batches for IPC file

pitrou commented on code in PR #12812:
URL: https://github.com/apache/arrow/pull/12812#discussion_r852244788


##########
cpp/src/arrow/record_batch.h:
##########
@@ -227,6 +227,11 @@ class ARROW_EXPORT RecordBatchReader {
   /// \return Status
   virtual Status ReadNext(std::shared_ptr<RecordBatch>* batch) = 0;
 
+  virtual Status ReadNext(std::shared_ptr<RecordBatch>* batch,
+                          std::shared_ptr<KeyValueMetadata>* custom_metadata) {
+    return Status::NotImplemented("ReadNext with custom metadata");
+  }

Review Comment:
   Perhaps something like:
   ```c++
   struct RecordBatchWithMetadata {
     std::shared_ptr<RecordBatch> batch;
     std::shared_ptr<KeyValueMetadata> custom_metadata;
   };
   virtual Result<RecordBatchWithMetadata> ReadNext();
   ```



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

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

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