-
Notifications
You must be signed in to change notification settings - Fork 21
Upgrade DuckDB and extension CI tools to version 1.5.0 #261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
2174609
2a669c9
016d7e6
adbf0d4
f0dcde8
7cfcb4e
910197e
05f4f4e
dd038e1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,9 @@ | ||
| # This file is included by DuckDB's build system. It specifies which extension | ||
| # to load | ||
|
|
||
| # Ensure dependencies are loaded before flock bootstraps config | ||
| duckdb_extension_load(core_functions) | ||
| duckdb_extension_load(json) | ||
|
|
||
| # Extension from this repo | ||
| duckdb_extension_load(flock SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR} LOAD_TESTS) | ||
|
|
||
| # Any extra extensions that should be built e.g.: duckdb_extension_load(json) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -84,11 +84,16 @@ void LlmFilter::Execute(duckdb::DataChunk& args, duckdb::ExpressionState& state, | |
| auto& func_expr = state.expr.Cast<duckdb::BoundFunctionExpression>(); | ||
| auto* bind_data = &func_expr.bind_info->Cast<LlmFunctionBindData>(); | ||
|
|
||
| const auto results = LlmFilter::Operation(args, bind_data); | ||
|
|
||
| auto index = 0; | ||
| for (const auto& res: results) { | ||
| result.SetValue(index++, duckdb::Value(res)); | ||
| 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]); }); | ||
|
Comment on lines
+87
to
+91
|
||
| } else { | ||
| auto index = 0; | ||
| for (const auto& res: results) { | ||
| result.SetValue(index++, duckdb::Value(res)); | ||
| } | ||
| } | ||
|
|
||
| auto exec_end = std::chrono::high_resolution_clock::now(); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,25 @@ | ||
| find_package(GTest CONFIG REQUIRED) | ||
|
|
||
| file(GLOB_RECURSE TEST_SOURCES *.cpp) | ||
| list(REMOVE_ITEM TEST_SOURCES "test_main.cpp") | ||
| file(GLOB_RECURSE TEST_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) | ||
| list(FILTER TEST_SOURCES EXCLUDE REGEX ".*test_main\\.cpp$") | ||
|
Comment on lines
+3
to
+4
|
||
|
|
||
| file(COPY unit_test.db DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) | ||
|
|
||
| add_executable(${PROJECT_NAME}_tests test_main.cpp ${TEST_SOURCES}) | ||
|
|
||
| target_link_libraries(${PROJECT_NAME}_tests PRIVATE ${PROJECT_NAME}_extension | ||
| GTest::gtest GTest::gmock) | ||
| # GNU ld (Linux + MinGW) needs --start-group/--end-group for circular deps | ||
| # jemalloc is only built on Linux | ||
| target_link_libraries(${PROJECT_NAME}_tests PRIVATE | ||
| GTest::gtest | ||
| GTest::gmock | ||
| $<$<CXX_COMPILER_ID:GNU>:-Wl,--start-group> | ||
| ${PROJECT_NAME}_extension | ||
| duckdb_generated_extension_loader | ||
| core_functions_extension | ||
| json_extension | ||
| parquet_extension | ||
| $<$<PLATFORM_ID:Linux>:jemalloc_extension> | ||
| duckdb_static | ||
| $<$<CXX_COMPILER_ID:GNU>:-Wl,--end-group>) | ||
|
|
||
| add_test(AllTestsInMain ${PROJECT_NAME}_tests) | ||
There was a problem hiding this comment.
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 byCMAKE_CXX_COMPILER_ID MATCHES "Clang"(and using--coverage/-fprofile-arcs -ftest-coveragefor GNU), or documenting that Coverage builds require Clang.