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/12 17:06:35 UTC

[GitHub] [arrow] bkietz commented on a change in pull request #10295: ARROW-11161: [C++][Python] Add stream metadata

bkietz commented on a change in pull request #10295:
URL: https://github.com/apache/arrow/pull/10295#discussion_r631232530



##########
File path: cpp/src/arrow/io/interfaces.h
##########
@@ -49,6 +49,26 @@ struct ReadRange {
   }
 };
 
+struct StreamMetadata {
+  struct KeyValue {
+    std::string key;
+    std::string value;
+
+    KeyValue() = default;
+    KeyValue(std::string key, std::string value)
+        : key(std::move(key)), value(std::move(value)) {}
+
+    friend bool operator==(const KeyValue& left, const KeyValue& right) {
+      return (left.key == right.key && left.value == right.value);
+    }
+    friend bool operator!=(const KeyValue& left, const KeyValue& right) {
+      return !(left == right);
+    }
+  };
+
+  std::vector<KeyValue> items;
+};

Review comment:
       Mostly, I'd like to reuse KeyValueMetadata unless there's a reason not to




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