devinjdangelo commented on issue #8487:
URL: 
https://github.com/apache/arrow-datafusion/issues/8487#issuecomment-1849128322

   The Vec<RecordBatch> that is returned will contain a single RecordBatch with 
a single Row and Column, which is the count of rows written. 
   
   Result<Vec<RecordBatch>> is the return type since under the hood write table 
calls collect() which collects a stream of RecordBatchs into a Vec. It just so 
happens this specific plan will only return a single recordbatch with a single 
value.
   
   Since we know InsertExec will only return a single value, we could extract 
that value and cast to usize. Alternatively, we could expand the documentation 
to make this more clear.


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