pitrou commented on a change in pull request #10295:
URL: https://github.com/apache/arrow/pull/10295#discussion_r640800919
##########
File path: cpp/src/arrow/io/interfaces.cc
##########
@@ -105,6 +107,22 @@ Result<util::string_view> InputStream::Peek(int64_t
ARROW_ARG_UNUSED(nbytes)) {
bool InputStream::supports_zero_copy() const { return false; }
+Result<std::shared_ptr<const KeyValueMetadata>> InputStream::ReadMetadata() {
+ return std::shared_ptr<const KeyValueMetadata>{};
+}
+
+// Default ReadMetadataAsync() implementation: simply issue the read on the
context's
+// executor
+Future<std::shared_ptr<const KeyValueMetadata>> InputStream::ReadMetadataAsync(
+ const IOContext& ctx) {
+ auto self = shared_from_this();
+ return DeferNotOk(internal::SubmitIO(ctx, [self] { return
self->ReadMetadata(); }));
Review comment:
`IOContext` copies are cheap, so I'm not sure there's a problem here.
--
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:
[email protected]