From 59717adf87f920017408d5108e98a5af4a578a04 Mon Sep 17 00:00:00 2001 From: Aaron Ang Date: Sun, 10 May 2026 20:56:12 -0400 Subject: [PATCH 1/2] Fix editable/debug build after StructVector API change and vector header split The submodule pin pulls in two DuckDB changes that break the editable/debug build configured with DISABLE_UNITY=1 (see pyproject.toml editable overrides): 1. StructVector::GetEntries now returns vector& instead of vector>& (duckdb commit 4e5d5da6a6 "Make StructVector have the same layout as DataChunk"). Drop the dereference at the two call sites that iterated the entries with *children[i]. 2. ListVector / ArrayVector / StructVector / MapVector were moved into their own headers under duckdb/common/vector/. Without unity these are no longer pulled in transitively, so add explicit includes. cibuildwheel builds (the CI release path) use unity and don't hit either issue, which is why this regression went unnoticed. --- src/duckdb_py/native/python_conversion.cpp | 5 ++++- src/duckdb_py/numpy/array_wrapper.cpp | 2 ++ src/duckdb_py/numpy/numpy_scan.cpp | 4 +++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/duckdb_py/native/python_conversion.cpp b/src/duckdb_py/native/python_conversion.cpp index a56ea73f..526bdadd 100644 --- a/src/duckdb_py/native/python_conversion.cpp +++ b/src/duckdb_py/native/python_conversion.cpp @@ -10,6 +10,9 @@ #include "datetime.h" //From Python #include "duckdb/common/limits.hpp" +#include "duckdb/common/vector/array_vector.hpp" +#include "duckdb/common/vector/list_vector.hpp" +#include "duckdb/common/vector/struct_vector.hpp" namespace duckdb { @@ -860,7 +863,7 @@ struct PythonVectorConversion { auto &struct_children = StructVector::GetEntries(result); for (idx_t i = 0; i < child_count; i++) { auto child_ele = PyTuple_GetItem(ele.ptr(), i); - TransformPythonObject(child_ele, *struct_children[i], result_offset); + TransformPythonObject(child_ele, struct_children[i], result_offset); } } diff --git a/src/duckdb_py/numpy/array_wrapper.cpp b/src/duckdb_py/numpy/array_wrapper.cpp index ac3f7991..81e07a76 100644 --- a/src/duckdb_py/numpy/array_wrapper.cpp +++ b/src/duckdb_py/numpy/array_wrapper.cpp @@ -10,6 +10,8 @@ #include "duckdb_python/pyconnection/pyconnection.hpp" #include "duckdb_python/pyresult.hpp" #include "duckdb/common/types/uuid.hpp" +#include "duckdb/common/vector/array_vector.hpp" +#include "duckdb/common/vector/list_vector.hpp" #include diff --git a/src/duckdb_py/numpy/numpy_scan.cpp b/src/duckdb_py/numpy/numpy_scan.cpp index b1cd6e60..5caa4c68 100644 --- a/src/duckdb_py/numpy/numpy_scan.cpp +++ b/src/duckdb_py/numpy/numpy_scan.cpp @@ -4,6 +4,8 @@ #include "duckdb_python/python_conversion.hpp" #include "duckdb/common/string_util.hpp" #include "duckdb/common/types/timestamp.hpp" +#include "duckdb/common/vector/map_vector.hpp" +#include "duckdb/common/vector/struct_vector.hpp" #include "utf8proc_wrapper.hpp" #include "duckdb/common/case_insensitive_map.hpp" #include "duckdb_python/pandas/pandas_bind.hpp" @@ -136,7 +138,7 @@ static void SetInvalidRecursive(Vector &out, idx_t index) { if (out.GetType().InternalType() == PhysicalType::STRUCT) { auto &children = StructVector::GetEntries(out); for (idx_t i = 0; i < children.size(); i++) { - SetInvalidRecursive(*children[i], index); + SetInvalidRecursive(children[i], index); } } } From d248325be532c0e0b08ff6d6967e634899d297f7 Mon Sep 17 00:00:00 2001 From: Aaron Ang Date: Sun, 10 May 2026 21:18:22 -0400 Subject: [PATCH 2/2] Point .clangd CompilationDatabase at build/debug The editable build (configured in pyproject.toml) writes compile_commands.json to build/debug/, but .clangd has been pointing at build/clangd/, which is never populated. Result: clangd cannot find the compile DB and reports 'file not found' on every project header. Align .clangd with the actual editable build-dir so the IDE picks up the existing compile_commands.json without an extra symlink. --- .clangd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.clangd b/.clangd index d4318e44..37d33f20 100644 --- a/.clangd +++ b/.clangd @@ -1,3 +1,3 @@ CompileFlags: - CompilationDatabase: build/clangd + CompilationDatabase: build/debug Add: -Wno-unqualified-std-cast-call