lxy-9602 opened a new issue, #259:
URL: https://github.com/apache/paimon-cpp/issues/259

   ### Search before asking
   
   - [x] I searched in the 
[issues](https://github.com/apache/paimon-cpp/issues) and found nothing similar.
   
   
   ### Motivation
   
   Paimon C++ currently requires a `BatchReader` to outlive its returned 
`ReadBatch`, because batch buffers may use Arrow or ORC memory pools owned by 
the reader. This lifetime coupling is inconvenient for downstream engines and 
can cause invalid memory access if the reader is destroyed first.
   
   ### Solution
   
   Retain the required memory-pool smart pointers in the root `ArrowArray,` so 
the batch can safely outlive its reader.
   Consumers must keep, move, and release the complete root `ArrowArray`. 
Moving individual child arrays out of it is unsupported because child arrays do 
not retain the memory-pool lifetime independently.
   
   ### Anything else?
   
   Related discussion: 
[https://github.com/alibaba/paimon-cpp/issues/126](https://github.com/alibaba/paimon-cpp/issues/126)
   
   ### Are you willing to submit a PR?
   
   - [x] I'm willing to submit a PR!


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