westonpace commented on code in PR #13582:
URL: https://github.com/apache/datafusion/pull/13582#discussion_r1861099086


##########
datafusion/catalog/src/catalog.rs:
##########
@@ -102,24 +103,25 @@ use datafusion_common::Result;
 ///
 /// [`TableProvider`]: crate::TableProvider
 
+#[async_trait]
 pub trait CatalogProvider: Debug + Sync + Send {
     /// Returns the catalog provider as [`Any`]
     /// so that it can be downcast to a specific implementation.
     fn as_any(&self) -> &dyn Any;
 
     /// Retrieves the list of available schema names in this catalog.
-    fn schema_names(&self) -> Vec<String>;
+    async fn schema_names(&self) -> Vec<String>;

Review Comment:
   Yeah, I just now ran into a similar problem as well.  It's bothersome I 
can't do...
   
   ```
   let catalog_list = self.catalog_list.clone()
   let catalog_names = catalog_list.catalog_names().await;
   MagicBindingStream::new(catalog_list, catalog_names)
   ```
   
   Similar to what I can do with futures...
   
   ```
   let temporary_obj = self.thing.clone();
   async move {
     temporary_obj.fut_returning_that_depends_on_self().await
   }
   ```



-- 
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...@datafusion.apache.org

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


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

Reply via email to