# Partitioning
- output_paritioning:表示当前 plan 的并发/分区数,也即输出多少个 output streams
- 每个 parition 输出一个 SendableRecordBatchStream
- 表示调用 execute 时需要多少个并发
## TODO
- [x] DataSource的并发如何确定的
- DataSource::output_partitioning()
- 最终取决于 FileScanConfig
- [ ] 何时需要添加 Repar
---
# SendableRecordBatchStream
- 执行 ExecutionPlan::execute() 后返回
- 中断执行: drop stream 即可
- drop 后需要保证 stream 持有的资源能够释放
- 例如 spawn 的 tasks,推荐使用 drop 时可以自动 abort 的 SpawnedTask 封装
- 为了能够及时中断,stream 不能无限期地阻塞 CPU,需要定期 yield back 给 tokio。
---