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

   ### 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, and tests `DictionaryMemo`'s replacement and 
delta handling directly.
   - `DictionaryReferencePythonTests` reads a stream from pyarrow that contains 
a dictionary delta and a replacement.
   - `PoisonMemoryAllocator` is a test allocator that overwrites memory when 
it's released.
   
   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