GitHub user phillipleblanc closed a discussion: Proposal: Rename `FileSinkExec`
## Update (4/13/2024) This was renamed to `DataSinkExec` in https://github.com/apache/arrow-datafusion/pull/10065 ## TL;DR: I'm proposing to rename [`FileSinkExec`](https://github.com/apache/arrow-datafusion/blob/main/datafusion/physical-plan/src/insert.rs#L80) to `InsertExec` or `DataSinkExec` (or another suitable name). ## Why In the middle of implementing `TableProvider.insert_into` for a TableProvider to write to a remote query engine, I searched the DataFusion codebase for examples of how this was done. I ran across `FileSinkExec` but dismissed it, since I wasn't writing to a file and I figured it was specific to that. I ended up writing a custom Execution Plan that would perform the insert and return an Arrow record with the number of rows changed - but I felt that surely this was already done somewhere. I ended up finding the [`DataSink`](https://github.com/apache/arrow-datafusion/blob/main/datafusion/physical-plan/src/insert.rs#L51) trait - which looked perfect for my use-case - and eventually realized that `FileSinkExec` was initially called [`InsertExec`](https://github.com/apache/arrow-datafusion/pull/6354) - which I would have used from the beginning if it had been called that. (Renamed in https://github.com/apache/arrow-datafusion/pull/7283) As far as I can tell `FileSinkExec` isn't specific to files - but I'm still new to the DataFusion codebase, so I might be missing some context. I reworked my implementation to implement `DataSink` for the actual insert and use `FileSinkExec` in the TableProvider - and it all works. Thoughts on renaming it to `InsertExec` or `DataSinkExec`? GitHub link: https://github.com/apache/datafusion/discussions/9940 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
