alamb commented on PR #3595:
URL: 
https://github.com/apache/arrow-datafusion/pull/3595#issuecomment-1256063880

   What if we could encode the same information of `Ok(None)` as an 
`DataFusionError` variant
   
   So if we had
   
   ```rust
       fn get_by_url(&self, url: &Url) -> Result<dyn ObjectStore> {
         ...
       }
   ```
   
   Then the code in ballista might look like:
   
   ```rust
          // If no store found, then try to find and register one through XXXXX.
           match store {
             Err(DataFusionError::StoreNotFound(_)) => {
               store = self.register_through_XXXXX(url)?;
             }
             _ => return store;
   ```
   
   Or something similar
   
   That being said, I don't personally have a preference between 
`Result<Option<_>>` and if this unblocks work upstream it seems reasonable to me


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