yjshen edited a comment on pull request #1905:
URL: 
https://github.com/apache/arrow-datafusion/pull/1905#issuecomment-1059731719


   I'm afraid not. 😬
   Arc::get_mut needs self to be a mutable reference.
   ```rust
       pub fn get_mut(this: &mut Self) -> Option<&mut T> {
   ```
   but not the case in ChunkReader:
   ```rust
   pub trait ChunkReader: Length + Send + Sync {
       type T: Read + Send;
       /// get a serialy readeable slice of the current reader
       /// This should fail if the slice exceeds the current bounds
       fn get_read(&self, start: u64, length: usize) -> Result<Self::T>;
   }
   ```
   `get_read` &self is immutable
   
   Even if I remove Sync from ChunkReader, I still need `Arc<Mutex<dyn 
ObjectReader>>` which is required by Send.


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