raulcd commented on code in PR #48082:
URL: https://github.com/apache/arrow/pull/48082#discussion_r2504634973


##########
cpp/src/arrow/flight/server.cc:
##########
@@ -317,8 +312,7 @@ class RecordBatchStream::RecordBatchStreamImpl {
         return Status::OK();
       }
       if (!writer_) {
-        return Status::UnknownError(
-            "Writer should be initialized before reading Next batches");
+        RETURN_NOT_OK(InitializeWriter());

Review Comment:
   I think in this specific scenario we might have to drop the first message 
after calling `writer_->WriteRecordBatch`, which will be a schema message, 
after creation of the `ipc::internal::OpenRecordBatchWriter` and we want to 
keep the rest of the messages which should be the expected `RecordBatch` for 
those cases.
   I would have to debug but from what I understand that might be the cause of 
the current problem.
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to