cpcloud commented on a change in pull request #1699:
URL: https://github.com/apache/arrow-datafusion/pull/1699#discussion_r795038010
##########
File path: datafusion/src/execution/dataframe_impl.rs
##########
@@ -488,6 +553,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());
+ Ok(())
Review comment:
@alamb @houqp
It looks like I can't compare the plans directly, because they are referring
to different tables:
```
Projection: #aggregate_test_100.c1, #aggregate_test_100.c12
TableScan: aggregate_test_100 projection=None
Projection: #test_table.c1, #test_table.c12
TableScan: test_table projection=None
```
Does it suffice to compare only the results of execution?
--
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]