CurtHagenlocher opened a new pull request, #527:
URL: https://github.com/apache/arrow-dotnet/pull/527

   ### What's changed?
   
   An IPC reader keeps the dictionaries it reads in its `DictionaryMemo`, but 
it never released them. The record batches it returned also referred to the 
reader's dictionaries without holding references of their own. This makes 
ownership explicit:
   
   - The reader owns the dictionaries it keeps. It releases a dictionary when 
it is replaced, a delta and the dictionary it extends once they are combined, 
and all of them when the reader is disposed.
   - Each record batch holds its own reference to the dictionaries it uses. 
Batches and the reader can then be disposed in any order, and batches can 
outlive the reader.
   - `ArrowStreamReaderImplementation.Dispose` now calls the base class, so the 
stream and file readers also release their dictionaries.
   
   ### Testing
   
   `DictionaryReferenceTests` reads compressed and uncompressed data with both 
the stream and file readers. It covers:
   - disposing batches as they are read, and out of order
   - using batches after the reader is disposed
   - dictionary allocations being released once the reader and every batch 
using them are disposed
   
   All suites pass on net462, net472 and net8.0.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   Co-Authored-By: Claude Opus 5.5 <[email protected]>
   


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