Skip to content

Add INSERT_EXECUTION_DESIGN.md to dev_docs/ covering PhysicalInsert and the single-thread Combine slow path #25

Description

@ybtsdst

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)

  1. PhysicalInsert Sink / Combine / Finalize call paths — full execution flow.
  2. Parallel vs serial Combine: what determines the choice (preserve_insertion_order setting, presence of indexes, ON CONFLICT clause, etc.).
  3. 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.
  4. 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.

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions