Skip to content

Commit

Permalink
some docs
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewgapp committed Jan 15, 2024
1 parent 15be1ea commit be991c9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,17 @@ use datafusion_common::DataFusionError;
use crate::datasource::{TableProvider, TableType};
use crate::execution::context::SessionState;

/// TODO: add docs
/// The temporary working table where the previous iteration of a recursive query is stored
/// Naming is based on PostgreSQL's implementation.
/// See here for more details: www.postgresql.org/docs/11/queries-with.html#id-1.5.6.12.5.4
pub struct CteWorkTable {
name: String,
/// This schema must be shared across both the static and recursive terms of a recursive query
table_schema: SchemaRef,
}

impl CteWorkTable {
/// TODO: add doc
/// construct a new CteWorkTable with the given name and schema
pub fn new(name: &str, table_schema: SchemaRef) -> Self {
Self {
name: name.to_owned(),
Expand Down
2 changes: 1 addition & 1 deletion datafusion/core/src/datasource/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
//! [`ListingTable`]: crate::datasource::listing::ListingTable
pub mod avro_to_arrow;
pub mod cte;
pub mod cte_worktable;
pub mod default_table_source;
pub mod empty;
pub mod file_format;
Expand Down
2 changes: 1 addition & 1 deletion datafusion/core/src/execution/context/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ mod parquet;
use crate::{
catalog::{CatalogList, MemoryCatalogList},
datasource::{
cte::CteWorkTable,
cte_worktable::CteWorkTable,
function::{TableFunction, TableFunctionImpl},
listing::{ListingOptions, ListingTable},
provider::TableProviderFactory,
Expand Down

0 comments on commit be991c9

Please sign in to comment.