Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion datafusion/core/src/dataframe/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1655,7 +1655,7 @@ impl DataFrame {
pub fn into_view(self) -> Arc<dyn TableProvider> {
Arc::new(DataFrameTableProvider {
plan: self.plan,
table_type: TableType::Temporary,
table_type: TableType::View,
})
}

Expand Down
4 changes: 3 additions & 1 deletion datafusion/core/tests/dataframe/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1627,7 +1627,9 @@ async fn register_table() -> Result<()> {
let df_impl = DataFrame::new(ctx.state(), df.logical_plan().clone());

// register a dataframe as a table
ctx.register_table("test_table", df_impl.clone().into_view())?;
let table_provider = df_impl.clone().into_view();
assert_eq!(table_provider.table_type(), TableType::View);
ctx.register_table("test_table", table_provider)?;

// pull the table out
let table = ctx.table("test_table").await?;
Expand Down