You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by "mkmkme (via GitHub)" <gi...@apache.org> on 2024/08/02 08:57:30 UTC
Re: [PR] [AVRO-3710] [C++] Permit DataFile use without stream ownership [avro]
mkmkme commented on code in PR #3056:
URL: https://github.com/apache/avro/pull/3056#discussion_r1701535646
##########
lang/c++/impl/DataFile.cc:
##########
@@ -63,35 +64,34 @@ boost::iostreams::zlib_params get_zlib_params() {
}
} // namespace
-DataFileWriterBase::DataFileWriterBase(const char *filename, const ValidSchema &schema, size_t syncInterval,
- Codec codec) : filename_(filename),
- schema_(schema),
+DataFileWriterBase::DataFileWriterBase(const char *filename,
+ const ValidSchema &schema,
+ size_t syncInterval,
+ Codec codec) : DataFileWriterBase(fileOutputStream(filename), schema, syncInterval, codec) {
+}
+
+DataFileWriterBase::DataFileWriterBase(OutputStream &outputStream,
Review Comment:
I might be missing something here, but can't this constructor make `DataFileWriterBase` outlive `OutputStream` that it uses?
--
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: issues-unsubscribe@avro.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org