onlyjackfrost commented on code in PR #16181:
URL: https://github.com/apache/datafusion/pull/16181#discussion_r2112068788


##########
datafusion/datasource/src/source.rs:
##########
@@ -58,8 +58,61 @@ use datafusion_physical_plan::filter_pushdown::{
 /// Requires `Debug` to assist debugging
 ///
 /// [`FileScanConfig`]: 
https://docs.rs/datafusion/latest/datafusion/datasource/physical_plan/struct.FileScanConfig.html
-/// [`MemorySourceConfig`]: 
https://docs.rs/datafusion/latest//datafusion/datasource/memory/struct.MemorySourceConfig.html
+/// [`MemorySourceConfig`]: 
https://docs.rs/datafusion/latest/datafusion/datasource/memory/struct.MemorySourceConfig.html
 /// [`FileSource`]: crate::file::FileSource
+/// [`FileFormat``]: 
https://docs.rs/datafusion/latest/datafusion/datasource/file_format/index.html
+/// [`TableProvider`]: 
https://docs.rs/datafusion/latest/datafusion/catalog/trait.TableProvider.html
+///
+/// The following diagram shows how DataSource, FileSource, and DataSourceExec 
are related
+/// ```text
+///                       ┌─────────────────────┐                              
-----► execute path
+///                       │                     │                              
┄┄┄┄┄► init path
+///                       │   DataSourceExec    │  
+///                       │                     │    
+///                       └───────▲─────────────┘
+///                               ┊  │
+///                               ┊  │
+///                       ┌──────────▼──────────┐                            
┌──────────-──────────┐
+///                       │                     │                            | 
                    |
+///                       │  DataSource(trait)  │                            | 
TableProvider(trait)|
+///                       │                     │                            | 
                    |
+///                       └───────▲─────────────┘                            
└─────────────────────┘
+///                               ┊  │                                         
         ┊
+///               ┌───────────────┿──┴────────────────┐                        
         ┊
+///               |   ┌┄┄┄┄┄┄┄┄┄┄┄┘                   |                        
         ┊
+///               |   ┊                               |                        
         ┊
+///    ┌──────────▼──────────┐             ┌──────────▼──────────┐             
         ┊
+///    │                     │             │                     │           
┌──────────▼──────────┐
+///    │   FileScanConfig    │             │ MemorySourceConfig  │           | 
                    |
+///    │                     │             │                     │           | 
 FileFormat(trait)  |
+///    └──────────────▲──────┘             └─────────────────────┘           | 
                    |
+///               │   ┊                                                      
└─────────────────────┘
+///               │   ┊                                                        
         ┊
+///               │   ┊                                                        
         ┊
+///    ┌──────────▼──────────┐                                               
┌──────────▼──────────┐
+///    │                     │                                               │ 
    arrow source    │
+///    │ FileSource(trait)   ◄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄│ 
         ...        │
+///    │                     │                                               │ 
   parquet source   │
+///    └─────────────────────┘                                               
└─────────────────────┘
+///               │
+///               │
+///               │
+///               │
+///    ┌──────────▼──────────┐
+///    │     arrow source    │
+///    │          ...        │
+///    │    parquet source   │
+///    └─────────────────────┘
+///               |
+///           FileStream
+///           file opener

Review Comment:
   delivered in 
[66f6dca](https://github.com/apache/datafusion/pull/16181/commits/66f6dca4752a7c68baa5ee62be0194f273556dfc)



##########
datafusion/datasource/src/source.rs:
##########
@@ -58,8 +58,61 @@ use datafusion_physical_plan::filter_pushdown::{
 /// Requires `Debug` to assist debugging
 ///
 /// [`FileScanConfig`]: 
https://docs.rs/datafusion/latest/datafusion/datasource/physical_plan/struct.FileScanConfig.html
-/// [`MemorySourceConfig`]: 
https://docs.rs/datafusion/latest//datafusion/datasource/memory/struct.MemorySourceConfig.html
+/// [`MemorySourceConfig`]: 
https://docs.rs/datafusion/latest/datafusion/datasource/memory/struct.MemorySourceConfig.html
 /// [`FileSource`]: crate::file::FileSource
+/// [`FileFormat``]: 
https://docs.rs/datafusion/latest/datafusion/datasource/file_format/index.html
+/// [`TableProvider`]: 
https://docs.rs/datafusion/latest/datafusion/catalog/trait.TableProvider.html
+///
+/// The following diagram shows how DataSource, FileSource, and DataSourceExec 
are related
+/// ```text
+///                       ┌─────────────────────┐                              
-----► execute path
+///                       │                     │                              
┄┄┄┄┄► init path
+///                       │   DataSourceExec    │  
+///                       │                     │    
+///                       └───────▲─────────────┘
+///                               ┊  │
+///                               ┊  │
+///                       ┌──────────▼──────────┐                            
┌──────────-──────────┐
+///                       │                     │                            | 
                    |
+///                       │  DataSource(trait)  │                            | 
TableProvider(trait)|
+///                       │                     │                            | 
                    |
+///                       └───────▲─────────────┘                            
└─────────────────────┘
+///                               ┊  │                                         
         ┊
+///               ┌───────────────┿──┴────────────────┐                        
         ┊
+///               |   ┌┄┄┄┄┄┄┄┄┄┄┄┘                   |                        
         ┊
+///               |   ┊                               |                        
         ┊
+///    ┌──────────▼──────────┐             ┌──────────▼──────────┐             
         ┊
+///    │                     │             │                     │           
┌──────────▼──────────┐
+///    │   FileScanConfig    │             │ MemorySourceConfig  │           | 
                    |
+///    │                     │             │                     │           | 
 FileFormat(trait)  |
+///    └──────────────▲──────┘             └─────────────────────┘           | 
                    |
+///               │   ┊                                                      
└─────────────────────┘
+///               │   ┊                                                        
         ┊
+///               │   ┊                                                        
         ┊
+///    ┌──────────▼──────────┐                                               
┌──────────▼──────────┐
+///    │                     │                                               │ 
    arrow source    │

Review Comment:
   delivered in 
[66f6dca](https://github.com/apache/datafusion/pull/16181/commits/66f6dca4752a7c68baa5ee62be0194f273556dfc)
   



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to