westonpace commented on a change in pull request #10134:
URL: https://github.com/apache/arrow/pull/10134#discussion_r618731254
##########
File path: cpp/src/arrow/dataset/file_parquet_test.cc
##########
@@ -56,9 +52,25 @@ using testing::Pointee;
using internal::checked_pointer_cast;
-class ArrowParquetWriterMixin : public ::testing::Test {
+class ArrowParquetWriterMixin {
public:
- Status WriteRecordBatch(const RecordBatch& batch,
parquet::arrow::FileWriter* writer) {
+ static std::shared_ptr<Buffer> Write(RecordBatchReader* reader) {
+ auto pool = ::arrow::default_memory_pool();
+
+ std::shared_ptr<Buffer> out;
+
+ auto sink = CreateOutputStream(pool);
+
+ ARROW_EXPECT_OK(WriteRecordBatchReader(reader, pool, sink));
+ // XXX the rest of the test may crash if this fails, since out will be
nullptr
Review comment:
Minor but could the method be changed to return `Result` so this comment
can go away?
--
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]