Skip to content

Upgrade DuckDB and extension CI tools to version 1.5.0#261

Merged
anasdorbani merged 9 commits into
mainfrom
dev
Apr 9, 2026
Merged

Upgrade DuckDB and extension CI tools to version 1.5.0#261
anasdorbani merged 9 commits into
mainfrom
dev

Conversation

@anasdorbani
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings April 9, 2026 20:43
@anasdorbani anasdorbani merged commit ed1ee54 into main Apr 9, 2026
5 of 7 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Flock DuckDB extension to target DuckDB/extension-ci-tools v1.5.0, adjusting build/test wiring and extension hook registration to match the newer DuckDB APIs.

Changes:

  • Bump CI workflows and docs to DuckDB v1.5.0.
  • Update extension hook registration (parser/operator) to use registration APIs rather than direct config vector mutation.
  • Adjust unit-test linking and extension build configuration (dependency loading + coverage build type support).

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
test/unit/CMakeLists.txt Refines test source discovery and expands link set for DuckDB 1.5.0-era targets.
src/include/flock_extension.hpp Adds DuckDB extension hook headers needed for new registration APIs.
src/functions/scalar/llm_filter/implementation.cpp Fixes llm_filter to broadcast single-result outputs across the chunk.
src/flock_extension.cpp Switches parser/operator hook setup to ParserExtension::Register / OperatorExtension::Register.
src/core/config/model.cpp Removes explicit INSTALL/LOAD JSON during config table setup.
README.md Updates stated DuckDB version requirement to 1.5.0+.
extension_config.cmake Loads core_functions and json before loading flock in DuckDB’s build system.
CMakeLists.txt Adds a Coverage build type and reorganizes coverage flag setup timing.
.github/workflows/MainDistributionPipeline.yml Pins extension CI workflows and DuckDB version to v1.5.0.
.github/copilot-instructions.md Updates documented targeted DuckDB version to v1.5.0.
Comments suppressed due to low confidence (2)

src/core/config/model.cpp:18

  • model_args is declared as JSON, but this function no longer ensures the JSON extension is available before creating the table. If JSON isn’t built-in/auto-loaded in DuckDB 1.5.0 for all environments, extension initialization may fail here. Please ensure the JSON extension is loaded as a runtime dependency (not just via extension_config.cmake), or avoid the JSON type in these config tables.
void Config::SetupDefaultModelsConfig(duckdb::Connection& con, std::string& schema_name) {
    const std::string table_name = Config::get_default_models_table_name();
    con.Query(duckdb_fmt::format(" CREATE TABLE IF NOT EXISTS {}.{} ( "
                                 " model_name VARCHAR NOT NULL PRIMARY KEY, "
                                 " model VARCHAR NOT NULL, "
                                 " provider_name VARCHAR NOT NULL, "
                                 " model_args JSON DEFAULT '{{}}'"
                                 " ); ",
                                 schema_name, table_name));

src/core/config/model.cpp:41

  • Same concern as above: this table uses a JSON column type but no longer installs/loads the JSON extension beforehand. If JSON isn’t guaranteed to be available, this can break first-run configuration. Please ensure JSON is loaded as a runtime dependency before executing this DDL.
void Config::SetupUserDefinedModelsConfig(duckdb::Connection& con, std::string& schema_name) {
    const std::string table_name = Config::get_user_defined_models_table_name();
    con.Query(duckdb_fmt::format(" CREATE TABLE IF NOT EXISTS {}.{} ( "
                                 " model_name VARCHAR NOT NULL PRIMARY KEY, "
                                 " model VARCHAR NOT NULL, "
                                 " provider_name VARCHAR NOT NULL, "
                                 " model_args JSON NOT NULL"
                                 " ); ",
                                 schema_name, table_name));

Comment thread test/unit/CMakeLists.txt
Comment on lines +3 to +4
file(GLOB_RECURSE TEST_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
list(FILTER TEST_SOURCES EXCLUDE REGEX ".*test_main\\.cpp$")
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

list(FILTER ...) requires CMake >= 3.6, but the repo’s cmake_minimum_required is 3.5. This will break configuration with the documented minimum CMake version. Either bump the minimum required CMake version, or replace this with a 3.5-compatible removal (e.g., list(REMOVE_ITEM TEST_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/test_main.cpp")).

Copilot uses AI. Check for mistakes.
Comment thread CMakeLists.txt
Comment on lines +24 to +29
# Coverage instrumentation (must be before targets are built)
if(CMAKE_BUILD_TYPE STREQUAL "Coverage")
message(STATUS "Enabling code coverage")
add_compile_options(-fprofile-instr-generate -fcoverage-mapping)
add_link_options(-fprofile-instr-generate -fcoverage-mapping)
endif()
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Coverage build type unconditionally adds Clang coverage flags (-fprofile-instr-generate -fcoverage-mapping). These flags will fail on GCC toolchains. Consider guarding by CMAKE_CXX_COMPILER_ID MATCHES "Clang" (and using --coverage/-fprofile-arcs -ftest-coverage for GNU), or documenting that Coverage builds require Clang.

Copilot uses AI. Check for mistakes.
Comment on lines +87 to +91
if (const auto results = LlmFilter::Operation(args, bind_data); static_cast<int>(results.size()) == 1) {
auto empty_vec = duckdb::Vector(std::string());
duckdb::UnaryExecutor::Execute<duckdb::string_t, duckdb::string_t>(
empty_vec, result, args.size(),
[&](duckdb::string_t name) { return duckdb::StringVector::AddString(result, results[0]); });
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The results.size() == 1 branch broadcasts by executing a per-row lambda that calls StringVector::AddString for every row, which duplicates the same string in the result heap. Prefer using DuckDB’s constant vector facilities to set a single constant value for the whole chunk to reduce allocations and memory use.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants