yjshen commented on pull request #1905:
URL: 
https://github.com/apache/arrow-datafusion/pull/1905#issuecomment-1059727088


   I cannot do `Arc<RefCell<dyn ObjectReader>>` since RefCell is not sync. 
Which is imposed by ChunkReader:
   ```rust
   pub trait ChunkReader: Length + Send + Sync 
   ```
   ```
   343 | impl ChunkReader for ObjectReaderWrapper {
       |      ^^^^^^^^^^^ `RefCell<(dyn ObjectReader + 'static)>` cannot be 
shared between threads safely
       |
       = help: the trait `Sync` is not implemented for `RefCell<(dyn 
ObjectReader + 'static)>`
       = note: required because of the requirements on the impl of `Sync` for 
`Arc<RefCell<(dyn ObjectReader + 'static)>>`
   ```
   
   I'm not sure I could remove Sync from ChunkReader, but I can try it first.
   
   


-- 
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: github-unsubscr...@arrow.apache.org

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


Reply via email to