Please add a new design doc at dev_docs/INSERT_EXECUTION_DESIGN.md following the same structure as the existing files in dev_docs/ (source file inventory table → class hierarchy → data flow / call chain → key code excerpts → design notes). Write in Chinese to match existing docs.
Scope (must cover)
PhysicalInsert Sink / Combine / Finalize call paths — full execution flow.
- Parallel vs serial Combine: what determines the choice (
preserve_insertion_order setting, presence of indexes, ON CONFLICT clause, etc.).
- Specifically the slow path at
src/execution/operator/persistent/physical_insert.cpp around line 680 (the single-threaded Combine branch activated when preserve_insertion_order = false) — what executes there, why it's serial, what the parallel alternative would have done.
- How the planner decides between
PhysicalInsert and PhysicalBatchInsert (cross-reference the existing BATCH_INSERT_DESIGN.md, do not duplicate).
Out of scope
- Optimizer-side INSERT planning (that belongs in a future optimizer-rules doc).
- Index maintenance internals (already covered by
ART_INDEX_DESIGN.md / CUSTOM_INDEX_DESIGN.md).
Style
- Cite line numbers in current
main (default branch v1.5-variegata).
- Use tables for file inventories.
- Keep design notes paragraph-form, not bullet-form.
- Output the new file via a PR against the default branch.
Please add a new design doc at
dev_docs/INSERT_EXECUTION_DESIGN.mdfollowing the same structure as the existing files indev_docs/(source file inventory table → class hierarchy → data flow / call chain → key code excerpts → design notes). Write in Chinese to match existing docs.Scope (must cover)
PhysicalInsertSink / Combine / Finalize call paths — full execution flow.preserve_insertion_ordersetting, presence of indexes, ON CONFLICT clause, etc.).src/execution/operator/persistent/physical_insert.cpparound line 680 (the single-threaded Combine branch activated whenpreserve_insertion_order = false) — what executes there, why it's serial, what the parallel alternative would have done.PhysicalInsertandPhysicalBatchInsert(cross-reference the existingBATCH_INSERT_DESIGN.md, do not duplicate).Out of scope
ART_INDEX_DESIGN.md/CUSTOM_INDEX_DESIGN.md).Style
main(default branchv1.5-variegata).