Based on DuckDB v1.1.2

Query Execution Flow

Copy

PipelineExecutor::Execute -> PipelineExecutor::PushFinalize -> PhysicalCopyToFile::Combine -> (custom) CopyFunction::copy_to_combine

Join

Bulk load

If the transaction is rolled back or aborted, the blocks that were pre-emptively written to disk are marked as unused and reclaimed by the system for use in subsequent writes. This might still cause the database file to grow temporarily, however, and may create gaps in the database file if there are multiple transactions writing at the same time with a subset of those transactions aborting. That space is not lost - however. It will be re-used by the system when new data is ingested.

Internal data format

Use Extension

Read extension README.md first.

Install

related code: src/main/extension/extension_install.cpp

Load

related code: src/main/extension/extension_load.cpp

Extension implementation

related code: src/include/duckdb/main/extension.hpp

Extension types

Table function

related code: src/include/duckdb/function/table_function.hpp

Reading multiple files

Overview

Copy function

related code: src/include/duckdb/function/copy_function.hpp

Tips

Links