frankliee opened a new issue, #1488:
URL: https://github.com/apache/iceberg-python/issues/1488

   ### Apache Iceberg version
   
   None
   
   ### Please describe the bug 🐞
   
   the bad code : load table in the sub process
   ```python
   from multiprocessing import Process
   worker_num = 2
   def worker(tbl):
       arr = tbl.scan().to_arrow()
       print(arr)
   
   from pyiceberg.catalog import load_catalog
   catalog = load_catalog("mycatalog")
   tbl = catalog.load_table("db.table")
   workers = [Process(target=worker, args=(tbl, )) for worker_id in 
range(worker_num)]
   [p.start() for p in workers]
   [p.join() for p in workers]
   ```
   
   the good code: load table in the main process
   
   ```python
   from multiprocessing import Process
   worker_num = 2
   def worker():
       from pyiceberg.catalog import load_catalog
       catalog = load_catalog("iceberg_catalog")
       tbl = catalog.load_table("dla_test.words")
       arr = tbl.scan().to_arrow()
       print(arr)
   
   workers = [Process(target=worker, args=()) for worker_id in 
range(worker_num)]
   [p.start() for p in workers]
   [p.join() for p in workers]
   
   ```
   
    
   
   ### Willingness to contribute
   
   - [ ] I can contribute a fix for this bug independently
   - [ ] I would be willing to contribute a fix for this bug with guidance from 
the Iceberg community
   - [ ] I cannot contribute a fix for this bug at this time


-- 
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: issues-unsubscr...@iceberg.apache.org.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to