kou opened a new pull request, #55387:
URL: https://github.com/apache/arrow/pull/55387

   ### Rationale for this change
   
   If we use `*arrow_table`, `TableBatchReader(const Table& table)` is used 
instead of `TableBatchReader(std::shared_ptr<Table> table)`. The former doesn't 
own the table. So the table may be freed while the `TableBatchReader` is still 
alive.
   
   For example, an exported stream keeps the TableBatchReader alive after the 
GArrowTableBatchReader is freed.
   
   ### What changes are included in this PR?
   
   Use `std::shared_ptr<Table>` instead of `const Table&`.
   
   ### Are these changes tested?
   
   Yes.
   
   ### Are there any user-facing changes?
   
   Yes.
   
   ### Was AI used for this PR?
   
   In accordance to the [AI generation 
guidelines](https://arrow.apache.org/docs/dev/developers/overview.html#ai-generated-code),
 please disclose below whether and how AI was used in this PR.
   
   **PR code and description written by:**
   
   - [x] Human
   - [x] AI
   
   **Reviewed before submission by:**
   
   - [x] Human
   - [x] AI
   - [ ] Not reviewed
   


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