Copilot commented on code in PR #1267:
URL:
https://github.com/apache/datafusion-python/pull/1267#discussion_r2426156545
##########
src/table.rs:
##########
@@ -15,15 +15,22 @@
// specific language governing permissions and limitations
// under the License.
+use crate::dataframe::PyDataFrame;
+use crate::dataset::Dataset;
+use crate::utils::table_provider_from_pycapsule;
+use arrow::datatypes::SchemaRef;
use arrow::pyarrow::ToPyArrow;
+use async_trait::async_trait;
+use datafusion::catalog::Session;
+use datafusion::common::Column;
use datafusion::datasource::{TableProvider, TableType};
+use datafusion::logical_expr::{Expr, LogicalPlanBuilder,
TableProviderFilterPushDown};
+use datafusion::physical_plan::ExecutionPlan;
+use datafusion::prelude::DataFrame;
use pyo3::prelude::*;
+use std::any::Any;
use std::sync::Arc;
Review Comment:
[nitpick] The import statements have been reorganized but are not in
alphabetical order. Consider grouping imports by crate (std, external crates,
internal crates) and sorting alphabetically within each group for better
maintainability.
##########
src/table.rs:
##########
@@ -104,3 +111,82 @@ impl From<Arc<dyn TableProvider>> for PyTable {
Self { table }
}
}
+
+#[derive(Clone, Debug)]
+pub(crate) struct TempViewTable {
+ df: Arc<DataFrame>,
+}
+
+/// This is nearly identical to `DataFrameTableProvider`
+/// except that it is for temporary tables.
Review Comment:
The comment mentions 'temporary tables' but the struct is for temporary
views. Consider updating the comment to say 'temporary views' for accuracy.
```suggestion
/// except that it is for temporary views.
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]