yukkit commented on PR #8143:
URL: 
https://github.com/apache/arrow-datafusion/pull/8143#issuecomment-1808087054

   I've organized the logic for the mutual conversion between `DFSchema` and 
`Schema` in datafusion. In theory, there should be no conversion logic from 
`Schema` to `DFSchema`. I've outlined all the modifications below.
   
   ## DFSchema to Schema
   
   ### No need to change
   
   DefaultPhysicalPlanner
   - DescribeTable
   - Values -> ValuesExec
   - EmptyRelation -> EmptyExec
   - Unnest -> UnnestExec
   - CopyTo
   - Explain
   - Analyze
   
   ### To be changed
   
   - [ ] TableProvider::schema
     - [ ] ViewTable
     - [ ] ListingTable
     - [ ] EmptyTable
     - [ ] MemTable
     - [ ] StreamingTable
   
   - DataFrame
     - [x] write_table: replace with DFSchema
     - [ ] cache: build MemTable
   
   ## Schema to DFSchema (To be changed)
   
   - [x] LogicalPlanBuilder::insert_into: can directly use DFSchema
   - [x] LogicalPlanBuilder::explain: can directly use DFSchema
   - [x] ConstEvaluator: construct DFSchema then to Schema
   - [x] SqlToRel::explain_to_plan: output schema can directly use DFSchema
   - [x] SqlToRel::describe_table_to_plan: output schema can directly use 
DFSchema
   - [ ] SqlToRel::insert_to_plan: depends on `table_source.schema()`
   - [ ] SqlToRel::delete_to_plan: depends on `table_source.schema()`
   - [ ] ListingTable::scan: used to create_physical_expr


-- 
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]

Reply via email to