You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/01/29 03:53:18 UTC

[GitHub] [arrow-datafusion] houqp commented on a change in pull request #1699: Implement TableProvider for DataFrameImpl

houqp commented on a change in pull request #1699:
URL: https://github.com/apache/arrow-datafusion/pull/1699#discussion_r794994159



##########
File path: datafusion/src/execution/dataframe_impl.rs
##########
@@ -488,6 +548,17 @@ mod tests {
         Ok(())
     }
 
+    #[tokio::test]
+    async fn register_table() -> Result<()> {
+        let df = test_table().await?.select_columns(&["c1", "c3"])?;
+        let mut ctx = ExecutionContext::new();
+        let df_impl = DataFrameImpl::new(ctx.state.clone(), &df.to_logical_plan());
+        ctx.register_table("test_table", Arc::new(df_impl))?;
+        let table = ctx.table("test_table")?;
+        assert_same_plan(&table.to_logical_plan(), &table.to_logical_plan());

Review comment:
       did you mean to compare `table.to_logical_plan()` with `df.to_logical_plan()` instead?




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

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