cpcloud commented on a change in pull request #1699:
URL: https://github.com/apache/arrow-datafusion/pull/1699#discussion_r795218939
##########
File path: datafusion/src/execution/dataframe_impl.rs
##########
@@ -62,6 +68,60 @@ impl DataFrameImpl {
}
}
+#[async_trait]
+impl TableProvider for DataFrameImpl {
Review comment:
Interesting, I don't think you can impl a trait for a trait (since the
introduction of the `dyn` requirement) but we might be able to do a blanket
impl like
```rust
impl<D: DataFrame> TableProvider for D {
...
}
```
Along with the trait bound, I think this will work to allow any DataFrame
implementation to be used as a table provider.
The main question for me is: given that the `scan` method returns a
physical plan, do I need to add a new DataFrame method to get a physical plan?
Or is there another way to get that with existing APIs?
--
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]