From a3b64634d859cf9bece23ba9736552e2bdb0f008 Mon Sep 17 00:00:00 2001 From: Matthew Gapp <61894094+matthewgapp@users.noreply.github.com> Date: Mon, 15 Jan 2024 13:52:17 -0800 Subject: [PATCH] more docs --- datafusion/core/src/datasource/cte_worktable.rs | 2 ++ datafusion/core/src/execution/context/mod.rs | 3 +++ 2 files changed, 5 insertions(+) diff --git a/datafusion/core/src/datasource/cte_worktable.rs b/datafusion/core/src/datasource/cte_worktable.rs index e8c47eb9c22db..147d4040c8c7c 100644 --- a/datafusion/core/src/datasource/cte_worktable.rs +++ b/datafusion/core/src/datasource/cte_worktable.rs @@ -46,6 +46,8 @@ pub struct CteWorkTable { impl CteWorkTable { /// construct a new CteWorkTable with the given name and schema + /// This schema must match the schema of the recursive term of the query + /// Since the scan method will contain an physical plan that assumes this schema pub fn new(name: &str, table_schema: SchemaRef) -> Self { Self { name: name.to_owned(), diff --git a/datafusion/core/src/execution/context/mod.rs b/datafusion/core/src/execution/context/mod.rs index c661e8368df5b..5d90aaedb943d 100644 --- a/datafusion/core/src/execution/context/mod.rs +++ b/datafusion/core/src/execution/context/mod.rs @@ -1900,6 +1900,9 @@ impl<'a> ContextProvider for SessionContextProvider<'a> { Ok(provider_as_source(provider)) } + /// Create a new CTE work table for a recursive CTE logical plan + /// This table will be used in conjunction with a Worktable physical plan + /// to read and write each iteration of a recursive CTE fn create_cte_work_table( &self, name: &str,