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


##########
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:
   There can be clearer, such as `FileOpener (called by FileStream)`



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to