mBaratta96 opened a new issue #9679:
URL: https://github.com/apache/arrow/issues/9679


   Hello, 
   as you can see in the code below, I'm having torubles adding new rows to a 
Table saved in a memory mapped file.
   I just want to write the file again with the new rows.
   ```python
       source = pa.memory_map(path, 'r')
       table = pa.ipc.RecordBatchFileReader(source).read_all()
       schema = pa.ipc.RecordBatchFileReader(source).schema
       new_table = create_arrow_table(schema.names) #new table from pydict with 
same schema and random new values
       updated_table = pa.concat_tables([pa.Table.from_pandas(table), 
new_table], promote=True)   
       source.close()
       with pa.MemoryMappedFile(path, 'w') as sink:
           with pa.RecordBatchFileWriter(sink, updated_table.schema) as writer:
              writer.write_table(table)
   ```
   I get an Exception stating that the memory mapped file is not closed.
   Any suggestion?
   
   


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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to