File tree Expand file tree Collapse file tree 4 files changed +12
-9
lines changed Expand file tree Collapse file tree 4 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -909,11 +909,6 @@ impl DFField {
909909 self . field = f. into ( ) ;
910910 self
911911 }
912-
913- pub fn with_qualifier ( mut self , qualifier : impl Into < OwnedTableReference > ) -> Self {
914- self . qualifier = Some ( qualifier. into ( ) ) ;
915- self
916- }
917912}
918913
919914impl From < FieldRef > for DFField {
Original file line number Diff line number Diff line change @@ -35,14 +35,19 @@ use datafusion_common::DataFusionError;
3535use crate :: datasource:: { TableProvider , TableType } ;
3636use crate :: execution:: context:: SessionState ;
3737
38- /// TODO: add docs
38+ /// The temporary working table where the previous iteration of a recursive query is stored
39+ /// Naming is based on PostgreSQL's implementation.
40+ /// See here for more details: www.postgresql.org/docs/11/queries-with.html#id-1.5.6.12.5.4
3941pub struct CteWorkTable {
4042 name : String ,
43+ /// This schema must be shared across both the static and recursive terms of a recursive query
4144 table_schema : SchemaRef ,
4245}
4346
4447impl CteWorkTable {
45- /// TODO: add doc
48+ /// construct a new CteWorkTable with the given name and schema
49+ /// This schema must match the schema of the recursive term of the query
50+ /// Since the scan method will contain an physical plan that assumes this schema
4651 pub fn new ( name : & str , table_schema : SchemaRef ) -> Self {
4752 Self {
4853 name : name. to_owned ( ) ,
Original file line number Diff line number Diff line change 2020//! [`ListingTable`]: crate::datasource::listing::ListingTable
2121
2222pub mod avro_to_arrow;
23- pub mod cte ;
23+ pub mod cte_worktable ;
2424pub mod default_table_source;
2525pub mod empty;
2626pub mod file_format;
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ mod parquet;
2626use crate :: {
2727 catalog:: { CatalogList , MemoryCatalogList } ,
2828 datasource:: {
29- cte :: CteWorkTable ,
29+ cte_worktable :: CteWorkTable ,
3030 function:: { TableFunction , TableFunctionImpl } ,
3131 listing:: { ListingOptions , ListingTable } ,
3232 provider:: TableProviderFactory ,
@@ -1900,6 +1900,9 @@ impl<'a> ContextProvider for SessionContextProvider<'a> {
19001900 Ok ( provider_as_source ( provider) )
19011901 }
19021902
1903+ /// Create a new CTE work table for a recursive CTE logical plan
1904+ /// This table will be used in conjunction with a Worktable physical plan
1905+ /// to read and write each iteration of a recursive CTE
19031906 fn create_cte_work_table (
19041907 & self ,
19051908 name : & str ,
You can’t perform that action at this time.
0 commit comments