jonahgao commented on issue #10776:
URL: https://github.com/apache/datafusion/issues/10776#issuecomment-2146478255

   `CustomExec` should return the projected schema. 
https://github.com/jonahgao/datafusion-example/commit/594cc7b48079c8317275927ed2f20fe83f4f0993
   
   The projection pushed down to the scan might be different from the final 
projection. In this case, an additional Projection plan will be added above the 
scan. You can use `df.explain` to check it.
   ```sh
   projection: Some([1, 2])
   +---------------+-------------------------------------------+
   | plan_type     | plan                                      |
   +---------------+-------------------------------------------+
   | logical_plan  | Projection: custom_csv.c, custom_csv.b    |
   |               |   TableScan: custom_csv projection=[b, c] |
   | physical_plan | ProjectionExec: expr=[c@1 as c, b@0 as b] |
   |               |   CustomExec                              |
   |               |                                           |
   +---------------+-------------------------------------------+
   ```


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