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



##########
File path: datafusion/src/execution/dataframe_impl.rs
##########
@@ -488,6 +547,44 @@ mod tests {
         Ok(())
     }
 
+    #[tokio::test]
+    async fn register_table() -> Result<()> {
+        let df = test_table().await?.select_columns(&["c1", "c12"])?;
+        let mut ctx = ExecutionContext::new();
+        let df_impl = DataFrameImpl::new(ctx.state.clone(), 
&df.to_logical_plan());
+
+        // register a dataframe as a table
+        ctx.register_table("test_table", Arc::new(df_impl))?;
+
+        // pull the table out and compare the plans
+        let table = ctx.table("test_table")?;
+
+        // check that we correctly read from the table
+        let df_results = &table

Review comment:
       ```suggestion
           let df_results = &df_impl
   ```




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