From 27d8833ab801b31d1c2d6b2e6f36119cde231868 Mon Sep 17 00:00:00 2001 From: sandeepsnairms Date: Fri, 14 Aug 2026 14:22:51 +0530 Subject: [PATCH 1/2] Add DocumentDB DuckDB extension --- .gitignore | 10 + .gitmodules | 7 + CMakeLists.txt | 46 ++ Makefile | 6 + README.md | 61 +- build_output.txt | 839 +++++++++++++++++++++++++++ docs/architecture.md | 40 ++ docs/usage.md | 40 ++ duckdb | 1 + extension-ci-tools | 1 + extension_config.cmake | 6 + include/documentdb/documentdb.hpp | 61 ++ src/documentdb_connection.cpp | 23 + src/documentdb_extension.cpp | 69 +++ src/documentdb_scan.cpp | 21 + src/documentdb_schema.cpp | 106 ++++ src/include/documentdb_extension.hpp | 14 + tests/documentdb_smoke_test.cpp | 40 ++ 18 files changed, 1390 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 .gitmodules create mode 100644 CMakeLists.txt create mode 100644 Makefile create mode 100644 build_output.txt create mode 100644 docs/architecture.md create mode 100644 docs/usage.md create mode 160000 duckdb create mode 160000 extension-ci-tools create mode 100644 extension_config.cmake create mode 100644 include/documentdb/documentdb.hpp create mode 100644 src/documentdb_connection.cpp create mode 100644 src/documentdb_extension.cpp create mode 100644 src/documentdb_scan.cpp create mode 100644 src/documentdb_schema.cpp create mode 100644 src/include/documentdb_extension.hpp create mode 100644 tests/documentdb_smoke_test.cpp diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3360b2e --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +build/ +cmake-build-debug/ +cmake-build-release/ +.vscode/ +.DS_Store +*.log +*.swp +*.user +__pycache__/ +*.pyc diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..510847c --- /dev/null +++ b/.gitmodules @@ -0,0 +1,7 @@ +[submodule "duckdb"] + path = duckdb + url = https://github.com/duckdb/duckdb.git + +[submodule "extension-ci-tools"] + path = extension-ci-tools + url = https://github.com/duckdb/extension-ci-tools.git diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..0fa7c7a --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,46 @@ +cmake_minimum_required(VERSION 3.5) + +set(TARGET_NAME documentdb) +set(EXTENSION_NAME ${TARGET_NAME}_extension) +set(LOADABLE_EXTENSION_NAME ${TARGET_NAME}_loadable_extension) + +project(${TARGET_NAME}) + +set(CMAKE_CXX_STANDARD "17" CACHE STRING "C++ standard to enforce") +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +include_directories(src/include) + +set(EXTENSION_SOURCES + src/documentdb_extension.cpp + src/documentdb_connection.cpp + src/documentdb_schema.cpp + src/documentdb_scan.cpp +) + +build_static_extension(${TARGET_NAME} ${EXTENSION_SOURCES}) +build_loadable_extension(${TARGET_NAME} " " ${EXTENSION_SOURCES}) + +target_include_directories(${EXTENSION_NAME} + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR}/include +) + +target_include_directories(${LOADABLE_EXTENSION_NAME} + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR}/include +) + +install( + TARGETS ${EXTENSION_NAME} + EXPORT "${DUCKDB_EXPORT_SET}" + LIBRARY DESTINATION "${INSTALL_LIB_DIR}" + ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" +) + +install( + TARGETS ${LOADABLE_EXTENSION_NAME} + EXPORT "${DUCKDB_EXPORT_SET}" + LIBRARY DESTINATION "${INSTALL_LIB_DIR}" + ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" +) diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ec8754b --- /dev/null +++ b/Makefile @@ -0,0 +1,6 @@ +PROJ_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) + +EXT_NAME=documentdb +EXT_CONFIG=${PROJ_DIR}extension_config.cmake + +include extension-ci-tools/makefiles/duckdb_extension.Makefile diff --git a/README.md b/README.md index e7a1995..8660bd6 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,61 @@ # duckdb-documentdb -Integrates DuckDB with DocumentDB, enabling direct SQL queries over DocumentDB collections without exporting data or ETL. + +DocumentDB integration for DuckDB, modeled after the MongoDB-style extension architecture used in duckdb-mongo. The repository is being evolved into a proper DuckDB extension with real extension registration, loadable binary output, and a documented DocumentDB-facing API surface. + +## What this repo is + +This repository is a practical starting point for a DuckDB extension that targets the DocumentDB ecosystem. The implementation currently includes: + +- a public connection and schema API +- a scan planner inspired by MongoDB-style pushdown design +- a real extension entry point for loading functions into DuckDB +- an extension build configuration aligned with DuckDB’s extension model + +## Key design goals + +- expose DocumentDB collections through DuckDB SQL +- keep document access live and pushdown-friendly +- infer schema from sample documents for DuckDB columns +- provide extension functions that load cleanly into the DuckDB runtime +- preserve a MongoDB-like design while adapting to DocumentDB semantics + +## Repository structure + +- [docs/architecture.md](docs/architecture.md): architecture notes and extension layout +- [docs/usage.md](docs/usage.md): build and usage guidance +- [include/documentdb/documentdb.hpp](include/documentdb/documentdb.hpp): public connection and planner API +- [src/documentdb_extension.cpp](src/documentdb_extension.cpp): DuckDB extension entry point and function registration +- [src/documentdb_connection.cpp](src/documentdb_connection.cpp): connection handling +- [src/documentdb_schema.cpp](src/documentdb_schema.cpp): schema inference and resolution +- [src/documentdb_scan.cpp](src/documentdb_scan.cpp): scan and pushdown planning +- [tests/documentdb_smoke_test.cpp](tests/documentdb_smoke_test.cpp): smoke validation for the API layer + +## Example usage + +```sql +SELECT documentdb_version('documentdb') AS version; +SELECT documentdb_collections('app') AS collections; +``` + +## Build + +```bash +git submodule update --init --recursive +make build +``` + +## Status + +This repo now includes the core extension plumbing needed for a real DuckDB extension and keeps the working C++ API layer and smoke tests. The next step is to connect it to a live DocumentDB backend and expand the SQL attach and scan semantics beyond the current scaffold. + +## Relationship to the base project + +This repo uses the duckdb-mongo extension as the architectural reference and adapts the same core ideas to DocumentDB: + +- SQL attach semantics +- document-to-column mapping +- schema inference +- pushdown-oriented scan planning +- live collection access through DuckDB + +The adaptation is targeted to DocumentDB rather than MongoDB while preserving the same developer experience where possible. diff --git a/build_output.txt b/build_output.txt new file mode 100644 index 0000000..02db3c7 --- /dev/null +++ b/build_output.txt @@ -0,0 +1,839 @@ +MSBuild version 17.14.51+25f168cee for .NET Framework + + 1>Checking Build System + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/catalog/catalog_entry/dependency/CMakeLists.txt + ub_duckdb_catalog_entries_dependency.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/adbc/nanoarrow/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/adbc/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/catalog/default/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/table/arrow/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/catalog/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/catalog/catalog_entry/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/planner/binder/tableref/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/aggregate/distributive/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/planner/binder/statement/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/planner/binder/query_node/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/planner/binder/expression/CMakeLists.txt + ub_duckdb_common.cpp + ub_duckdb_adbc_nanoarrow.cpp + ub_duckdb_adbc.cpp + ub_duckdb_catalog_entries.cpp + ub_duckdb_catalog.cpp + ub_duckdb_arrow_conversion.cpp + ub_duckdb_catalog_default_entries.cpp + ub_duckdb_aggr_distr.cpp + ub_duckdb_bind_tableref.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/allocator/CMakeLists.txt + ub_duckdb_bind_query_node.cpp + ub_duckdb_bind_statement.cpp + ub_duckdb_bind_expression.cpp + ub_duckdb_common_allocator.cpp + duckdb_catalog_entries_dependency.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\catalog\catalog_entry\dependency\duckdb_catalog_entries_dependency.dir\Release\duckdb_catalog_entries_dependency.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/arrow/CMakeLists.txt + duckdb_common_allocator.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\allocator\duckdb_common_allocator.dir\Release\duckdb_common_allocator.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/arrow/appender/CMakeLists.txt + ub_duckdb_common_arrow.cpp + ub_duckdb_common_arrow_appender.cpp + duckdb_arrow_conversion.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\table\arrow\duckdb_arrow_conversion.dir\Release\duckdb_arrow_conversion.lib + duckdb_adbc_nanoarrow.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\adbc\nanoarrow\duckdb_adbc_nanoarrow.dir\Release\duckdb_adbc_nanoarrow.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/crypto/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/enums/CMakeLists.txt + duckdb_catalog_default_entries.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\catalog\default\duckdb_catalog_default_entries.dir\Release\duckdb_catalog_default_entries.lib + duckdb_common_arrow_appender.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\arrow\appender\duckdb_common_arrow_appender.dir\Release\duckdb_common_arrow_appender.lib + duckdb_adbc.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\adbc\duckdb_adbc.dir\Release\duckdb_adbc.lib + ub_duckdb_common_enums.cpp + ub_duckdb_common_crypto.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/exception/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/multi_file/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/main/http/CMakeLists.txt + duckdb_common_crypto.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\crypto\duckdb_common_crypto.dir\Release\duckdb_common_crypto.lib + duckdb_bind_tableref.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\planner\binder\tableref\duckdb_bind_tableref.dir\Release\duckdb_bind_tableref.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/operator/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/serializer/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/tree_renderer/CMakeLists.txt + ub_duckdb_common_exception.cpp + ub_duckdb_common_http.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/types/CMakeLists.txt + ub_duckdb_common_multi_file.cpp + duckdb_bind_expression.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\planner\binder\expression\duckdb_bind_expression.dir\Release\duckdb_bind_expression.lib + duckdb_common_arrow.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\arrow\duckdb_common_arrow.dir\Release\duckdb_common_arrow.lib + ub_duckdb_common_serializer.cpp + ub_duckdb_common_tree_renderer.cpp + ub_duckdb_common_operators.cpp + duckdb_common_enums.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\enums\duckdb_common_enums.dir\Release\duckdb_common_enums.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/types/column/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/types/row/CMakeLists.txt + duckdb_common_exception.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\exception\duckdb_common_exception.dir\Release\duckdb_common_exception.lib + duckdb_catalog.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\catalog\duckdb_catalog.dir\Release\duckdb_catalog.lib + ub_duckdb_common_types.cpp + duckdb_bind_query_node.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\planner\binder\query_node\duckdb_bind_query_node.dir\Release\duckdb_bind_query_node.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/util/CMakeLists.txt + duckdb_catalog_entries.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\catalog\catalog_entry\duckdb_catalog_entries.dir\Release\duckdb_catalog_entries.lib + ub_duckdb_common_types_column.cpp + ub_duckdb_common_types_row.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/types/variant/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/vector/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/parser/constraints/CMakeLists.txt + ub_duckdb_common_util.cpp + ub_duckdb_common_variant.cpp + duckdb_common_serializer.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\serializer\duckdb_common_serializer.dir\Release\duckdb_common_serializer.lib + duckdb_common_operators.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\operator\duckdb_common_operators.dir\Release\duckdb_common_operators.lib + duckdb_bind_statement.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\planner\binder\statement\duckdb_bind_statement.dir\Release\duckdb_bind_statement.lib + ub_duckdb_constraints.cpp + duckdb_aggr_distr.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\aggregate\distributive\duckdb_aggr_distr.dir\Release\duckdb_aggr_distr.lib + ub_duckdb_common_vector_types.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/operator/csv_scanner/scanner/CMakeLists.txt + duckdb_common.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\duckdb_common.dir\Release\duckdb_common.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/operator/csv_scanner/buffer_manager/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/operator/csv_scanner/encode/CMakeLists.txt + duckdb_common_tree_renderer.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\tree_renderer\duckdb_common_tree_renderer.dir\Release\duckdb_common_tree_renderer.lib + duckdb_common_util.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\util\duckdb_common_util.dir\Release\duckdb_common_util.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/operator/csv_scanner/state_machine/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/operator/csv_scanner/sniffer/CMakeLists.txt + duckdb_constraints.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\parser\constraints\duckdb_constraints.dir\Release\duckdb_constraints.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/operator/csv_scanner/util/CMakeLists.txt + ub_duckdb_csv_scanner.cpp + duckdb_common_variant.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\types\variant\duckdb_common_variant.dir\Release\duckdb_common_variant.lib + ub_duckdb_csv_buffer_manager.cpp + ub_duckdb_csv_encode.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/CMakeLists.txt + duckdb_common_http.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\main\http\duckdb_common_http.dir\Release\duckdb_common_http.lib + ub_duckdb_csv_state_machine.cpp + duckdb_common_multi_file.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\multi_file\duckdb_common_multi_file.dir\Release\duckdb_common_multi_file.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/index/art/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/parser/expression/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/planner/expression_binder/CMakeLists.txt + ub_duckdb_csv_sniffer.cpp + ub_duckdb_execution_index_art.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/index/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/storage/external_file_cache/CMakeLists.txt + ub_duckdb_expression.cpp + ub_duckdb_csv_util.cpp + ub_duckdb_external_file_cache.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/expression_executor/CMakeLists.txt + ub_duckdb_execution.cpp + ub_duckdb_expression_binders.cpp + ub_duckdb_execution_index.cpp + duckdb_common_types_row.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\types\row\duckdb_common_types_row.dir\Release\duckdb_common_types_row.lib + ub_duckdb_expression_executor.cpp + duckdb_common_types_column.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\types\column\duckdb_common_types_column.dir\Release\duckdb_common_types_column.lib + duckdb_common_vector_types.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\vector\duckdb_common_vector_types.dir\Release\duckdb_common_vector_types.lib + duckdb_csv_buffer_manager.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\operator\csv_scanner\buffer_manager\duckdb_csv_buffer_manager.dir\Release\duckdb_csv_buffer_manager.lib + duckdb_csv_encode.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\operator\csv_scanner\encode\duckdb_csv_encode.dir\Release\duckdb_csv_encode.lib + duckdb_csv_state_machine.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\operator\csv_scanner\state_machine\duckdb_csv_state_machine.dir\Release\duckdb_csv_state_machine.lib + duckdb_expression.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\parser\expression\duckdb_expression.dir\Release\duckdb_expression.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/cast/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/aggregate/CMakeLists.txt + duckdb_external_file_cache.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\storage\external_file_cache\duckdb_external_file_cache.dir\Release\duckdb_external_file_cache.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/scalar/comparison/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/scalar/compressed_materialization/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/scalar/date/CMakeLists.txt + ub_duckdb_func_aggr.cpp + ub_duckdb_func_cast.cpp + duckdb_execution_index_art.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\index\art\duckdb_execution_index_art.dir\Release\duckdb_execution_index_art.lib + duckdb_common_types.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\types\duckdb_common_types.dir\Release\duckdb_common_types.lib + ub_duckdb_func_comparison.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/scalar/generic/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/scalar/list/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/scalar/geometry/CMakeLists.txt + duckdb_csv_sniffer.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\operator\csv_scanner\sniffer\duckdb_csv_sniffer.dir\Release\duckdb_csv_sniffer.lib + ub_duckdb_func_date.cpp + ub_duckdb_func_compressed_materialization.cpp + duckdb_csv_scanner.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\operator\csv_scanner\scanner\duckdb_csv_scanner.dir\Release\duckdb_csv_scanner.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/scalar/operator/CMakeLists.txt + ub_duckdb_func_generic_main.cpp + ub_duckdb_func_list_nested.cpp + duckdb_csv_util.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\operator\csv_scanner\util\duckdb_csv_util.dir\Release\duckdb_csv_util.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/pragma/CMakeLists.txt + ub_duckdb_func_geometry.cpp + duckdb_execution_index.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\index\duckdb_execution_index.dir\Release\duckdb_execution_index.lib + ub_duckdb_func_ops_main.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/scalar/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/scalar/sequence/CMakeLists.txt + duckdb_execution.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\duckdb_execution.dir\Release\duckdb_execution.lib + duckdb_expression_binders.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\planner\expression_binder\duckdb_expression_binders.dir\Release\duckdb_expression_binders.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/scalar/string/CMakeLists.txt + ub_duckdb_func_pragma.cpp + duckdb_func_date.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\scalar\date\duckdb_func_date.dir\Release\duckdb_func_date.lib + ub_duckdb_func_scalar.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/scalar/string/regexp/CMakeLists.txt + ub_duckdb_func_seq.cpp + duckdb_func_geometry.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\scalar\geometry\duckdb_func_geometry.dir\Release\duckdb_func_geometry.lib + ub_duckdb_func_string_main.cpp + duckdb_func_generic_main.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\scalar\generic\duckdb_func_generic_main.dir\Release\duckdb_func_generic_main.lib + duckdb_func_compressed_materialization.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\scalar\compressed_materialization\duckdb_func_compressed_materialization.dir\Release\duckdb_func_compressed_materialization.lib + duckdb_func_aggr.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\aggregate\duckdb_func_aggr.dir\Release\duckdb_func_aggr.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/table/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/scalar/system/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/scalar/struct/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/table/version/CMakeLists.txt + ub_duckdb_func_string_regexp.cpp + duckdb_expression_executor.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\expression_executor\duckdb_expression_executor.dir\Release\duckdb_expression_executor.lib + ub_duckdb_func_system.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/scalar/variant/CMakeLists.txt + duckdb_func_list_nested.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\scalar\list\duckdb_func_list_nested.dir\Release\duckdb_func_list_nested.lib + ub_duckdb_func_table.cpp + duckdb_func_comparison.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\scalar\comparison\duckdb_func_comparison.dir\Release\duckdb_func_comparison.lib + ub_duckdb_func_table_version.cpp + ub_duckdb_func_struct_main.cpp + duckdb_func_seq.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\scalar\sequence\duckdb_func_seq.dir\Release\duckdb_func_seq.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/window/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/CMakeLists.txt + ub_duckdb_func_variant_main.cpp + ub_duckdb_func_window.cpp + duckdb_func_pragma.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\pragma\duckdb_func_pragma.dir\Release\duckdb_func_pragma.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/scalar/map/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/variant/CMakeLists.txt + ub_duckdb_function.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/logging/CMakeLists.txt + ub_duckdb_function_variant.cpp + ub_duckdb_logging.cpp + ub_duckdb_function_map.cpp + duckdb_func_scalar.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\scalar\duckdb_func_scalar.dir\Release\duckdb_func_scalar.lib + duckdb_func_string_regexp.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\scalar\string\regexp\duckdb_func_string_regexp.dir\Release\duckdb_func_string_regexp.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/main/CMakeLists.txt + duckdb_function_variant.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\variant\duckdb_function_variant.dir\Release\duckdb_function_variant.lib + ub_duckdb_main.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/main/buffered_data/CMakeLists.txt + duckdb_function_map.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\scalar\map\duckdb_function_map.dir\Release\duckdb_function_map.lib + duckdb_func_table_version.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\table\version\duckdb_func_table_version.dir\Release\duckdb_func_table_version.lib + ub_duckdb_main_buffered_data.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/main/capi/cast/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/main/capi/CMakeLists.txt + duckdb_func_string_main.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\scalar\string\duckdb_func_string_main.dir\Release\duckdb_func_string_main.lib + duckdb_func_variant_main.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\scalar\variant\duckdb_func_variant_main.dir\Release\duckdb_func_variant_main.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/main/chunk_scan_state/CMakeLists.txt + ub_duckdb_main_capi_cast.cpp + ub_duckdb_main_capi.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/main/extension/CMakeLists.txt + duckdb_func_ops_main.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\scalar\operator\duckdb_func_ops_main.dir\Release\duckdb_func_ops_main.lib + duckdb_func_struct_main.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\scalar\struct\duckdb_func_struct_main.dir\Release\duckdb_func_struct_main.lib + ub_duckdb_main_chunk_scan_state.cpp + duckdb_func_window.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\window\duckdb_func_window.dir\Release\duckdb_func_window.lib + duckdb_logging.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\logging\duckdb_logging.dir\Release\duckdb_logging.lib + duckdb_func_system.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\scalar\system\duckdb_func_system.dir\Release\duckdb_func_system.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/main/relation/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/main/profiler/CMakeLists.txt + extension_alias.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/main/settings/CMakeLists.txt + duckdb_main_chunk_scan_state.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\main\chunk_scan_state\duckdb_main_chunk_scan_state.dir\Release\duckdb_main_chunk_scan_state.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/main/secret/CMakeLists.txt + duckdb_main_buffered_data.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\main\buffered_data\duckdb_main_buffered_data.dir\Release\duckdb_main_buffered_data.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/nested_loop_join/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/operator/aggregate/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/operator/csv_scanner/table_function/CMakeLists.txt + ub_duckdb_main_settings.cpp + ub_duckdb_main_profiler.cpp + ub_duckdb_main_relation.cpp + ub_duckdb_operator_aggregate.cpp + duckdb_main_capi_cast.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\main\capi\cast\duckdb_main_capi_cast.dir\Release\duckdb_main_capi_cast.lib + ub_duckdb_main_secret.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/operator/helper/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/operator/filter/CMakeLists.txt + duckdb_function.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\duckdb_function.dir\Release\duckdb_function.lib + ub_duckdb_nested_loop_join.cpp + ub_duckdb_operator_csv_table_function.cpp + duckdb_func_cast.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\cast\duckdb_func_cast.dir\Release\duckdb_func_cast.lib + ub_duckdb_operator_helper.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/operator/join/CMakeLists.txt + ub_duckdb_operator_join.cpp + ub_duckdb_operator_filter.cpp + extension_helper.cpp + duckdb_nested_loop_join.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\nested_loop_join\duckdb_nested_loop_join.dir\Release\duckdb_nested_loop_join.lib + duckdb_main_profiler.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\main\profiler\duckdb_main_profiler.dir\Release\duckdb_main_profiler.lib + duckdb_func_table.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\table\duckdb_func_table.dir\Release\duckdb_func_table.lib + duckdb_main_capi.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\main\capi\duckdb_main_capi.dir\Release\duckdb_main_capi.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/operator/persistent/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/operator/order/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/operator/projection/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/operator/scan/CMakeLists.txt + duckdb_operator_filter.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\operator\filter\duckdb_operator_filter.dir\Release\duckdb_operator_filter.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/operator/schema/CMakeLists.txt + ub_duckdb_operator_persistent.cpp + ub_duckdb_operator_order.cpp + ub_duckdb_operator_scan.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/operator/set/CMakeLists.txt + ub_duckdb_operator_schema.cpp + ub_duckdb_operator_projection.cpp + ub_duckdb_operator_set.cpp + duckdb_main_settings.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\main\settings\duckdb_main_settings.dir\Release\duckdb_main_settings.lib + extension_install.cpp + duckdb_operator_order.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\operator\order\duckdb_operator_order.dir\Release\duckdb_operator_order.lib + duckdb_operator_projection.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\operator\projection\duckdb_operator_projection.dir\Release\duckdb_operator_projection.lib + duckdb_main_secret.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\main\secret\duckdb_main_secret.dir\Release\duckdb_main_secret.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/optimizer/compressed_materialization/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/optimizer/matcher/CMakeLists.txt + duckdb_main_relation.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\main\relation\duckdb_main_relation.dir\Release\duckdb_main_relation.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/optimizer/join_order/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/optimizer/pushdown/CMakeLists.txt + duckdb_operator_csv_table_function.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\operator\csv_scanner\table_function\duckdb_operator_csv_table_function.dir\Release\duckdb_operator_csv_table_function.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/optimizer/pullup/CMakeLists.txt + ub_duckdb_optimizer_compressed_materialization.cpp + duckdb_operator_aggregate.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\operator\aggregate\duckdb_operator_aggregate.dir\Release\duckdb_operator_aggregate.lib + ub_duckdb_optimizer_matcher.cpp + ub_duckdb_optimizer_pushdown.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/optimizer/CMakeLists.txt + duckdb_operator_helper.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\operator\helper\duckdb_operator_helper.dir\Release\duckdb_operator_helper.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/optimizer/relation_statistics/CMakeLists.txt + ub_duckdb_optimizer_join_order.cpp + ub_duckdb_optimizer_pullup.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/optimizer/rule/CMakeLists.txt + duckdb_operator_set.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\operator\set\duckdb_operator_set.dir\Release\duckdb_operator_set.lib + ub_duckdb_optimizer_rules.cpp + ub_duckdb_optimizer_relation_statistics.cpp + duckdb_operator_join.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\operator\join\duckdb_operator_join.dir\Release\duckdb_operator_join.lib + ub_duckdb_optimizer.cpp + duckdb_operator_scan.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\operator\scan\duckdb_operator_scan.dir\Release\duckdb_operator_scan.lib + duckdb_operator_schema.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\operator\schema\duckdb_operator_schema.dir\Release\duckdb_operator_schema.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/optimizer/statistics/operator/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/optimizer/statistics/expression/CMakeLists.txt + duckdb_optimizer_pullup.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\optimizer\pullup\duckdb_optimizer_pullup.dir\Release\duckdb_optimizer_pullup.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/parallel/CMakeLists.txt + duckdb_optimizer_matcher.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\optimizer\matcher\duckdb_optimizer_matcher.dir\Release\duckdb_optimizer_matcher.lib + extension_load.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/parser/parsed_data/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/parser/CMakeLists.txt + duckdb_optimizer_compressed_materialization.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\optimizer\compressed_materialization\duckdb_optimizer_compressed_materialization.dir\Release\duckdb_optimizer_compressed_materialization.lib + ub_duckdb_optimizer_statistics_op.cpp + ub_duckdb_optimizer_statistics_expr.cpp + ub_duckdb_parallel.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/parser/peg/CMakeLists.txt + duckdb_optimizer_pushdown.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\optimizer\pushdown\duckdb_optimizer_pushdown.dir\Release\duckdb_optimizer_pushdown.lib + ub_duckdb_parsed_data.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/parser/peg/tokenizer/CMakeLists.txt + ub_duckdb_parser.cpp + duckdb_optimizer_rules.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\optimizer\rule\duckdb_optimizer_rules.dir\Release\duckdb_optimizer_rules.lib + ub_duckdb_parser_peg_tokenizer.cpp + ub_duckdb_parser_peg.cpp + duckdb_optimizer_statistics_expr.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\optimizer\statistics\expression\duckdb_optimizer_statistics_expr.dir\Release\duckdb_optimizer_statistics_expr.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/parser/peg/transformer/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/parser/tableref/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/physical_plan/CMakeLists.txt + duckdb_optimizer_relation_statistics.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\optimizer\relation_statistics\duckdb_optimizer_relation_statistics.dir\Release\duckdb_optimizer_relation_statistics.lib + ub_duckdb_parser_peg_transformer.cpp + duckdb_optimizer_join_order.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\optimizer\join_order\duckdb_optimizer_join_order.dir\Release\duckdb_optimizer_join_order.lib + extension_loader.cpp + ub_duckdb_physical_plan.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/planner/CMakeLists.txt + duckdb_operator_persistent.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\operator\persistent\duckdb_operator_persistent.dir\Release\duckdb_operator_persistent.lib + duckdb_parser_peg_tokenizer.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\parser\peg\tokenizer\duckdb_parser_peg_tokenizer.dir\Release\duckdb_parser_peg_tokenizer.lib + duckdb_optimizer_statistics_op.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\optimizer\statistics\operator\duckdb_optimizer_statistics_op.dir\Release\duckdb_optimizer_statistics_op.lib + ub_duckdb_parser_tableref.cpp + ub_duckdb_planner.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/planner/expression/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/planner/operator/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/planner/filter/CMakeLists.txt + ub_duckdb_planner_expression.cpp + ub_duckdb_planner_operator.cpp + ub_duckdb_planner_filter.cpp + duckdb_parser.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\parser\duckdb_parser.dir\Release\duckdb_parser.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/planner/subquery/CMakeLists.txt + ub_duckdb_planner_subquery.cpp + duckdb_parsed_data.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\parser\parsed_data\duckdb_parsed_data.dir\Release\duckdb_parsed_data.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/progress_bar/CMakeLists.txt + ub_duckdb_progress_bar.cpp + duckdb_planner_expression.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\planner\expression\duckdb_planner_expression.dir\Release\duckdb_planner_expression.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/parser/query_node/CMakeLists.txt + ub_duckdb_query_node.cpp + duckdb_parser_peg.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\parser\peg\duckdb_parser_peg.dir\Release\duckdb_parser_peg.lib + duckdb_parser_tableref.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\parser\tableref\duckdb_parser_tableref.dir\Release\duckdb_parser_tableref.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/sample/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/row_operations/CMakeLists.txt + ub_duckdb_sample.cpp + ub_duckdb_row_operations.cpp + duckdb_planner_filter.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\planner\filter\duckdb_planner_filter.dir\Release\duckdb_planner_filter.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/sort/CMakeLists.txt + ub_duckdb_sort.cpp + duckdb_progress_bar.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\progress_bar\duckdb_progress_bar.dir\Release\duckdb_progress_bar.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/parser/statement/CMakeLists.txt + ub_duckdb_statement.cpp + duckdb_query_node.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\parser\query_node\duckdb_query_node.dir\Release\duckdb_query_node.lib + duckdb_sample.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\sample\duckdb_sample.dir\Release\duckdb_sample.lib + Generating Code... + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/storage/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/storage/buffer/CMakeLists.txt + ub_duckdb_storage.cpp + duckdb_planner_operator.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\planner\operator\duckdb_planner_operator.dir\Release\duckdb_planner_operator.lib + ub_duckdb_storage_buffer.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/storage/checkpoint/CMakeLists.txt + ub_duckdb_storage_checkpoint.cpp + duckdb_parallel.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\parallel\duckdb_parallel.dir\Release\duckdb_parallel.lib + duckdb_main.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\main\duckdb_main.dir\Release\duckdb_main.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/storage/compression/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/storage/compression/alp/CMakeLists.txt + ub_duckdb_storage_compression.cpp + ub_duckdb_storage_compression_alp.cpp + duckdb_storage_buffer.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\storage\buffer\duckdb_storage_buffer.dir\Release\duckdb_storage_buffer.lib + duckdb_main_extension.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\main\extension\duckdb_main_extension.dir\Release\duckdb_main_extension.lib + duckdb_statement.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\parser\statement\duckdb_statement.dir\Release\duckdb_statement.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/storage/compression/dict_fsst/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/storage/compression/chimp/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/storage/compression/dictionary/CMakeLists.txt +C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\include\algorithm(7791,39): warning C4018: '<=': signed/unsigned mismatch [C:\Work\GH\repos\duckdb-documentdb\build\src\common\sort\duckdb_sort.vcxproj] + (compiling source file 'ub_duckdb_sort.cpp') + C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\include\algorithm(7791,39): + the template instantiation context (the oldest one first) is + C:\Work\GH\repos\duckdb-documentdb\duckdb\src\common\sort\sorted_run.cpp(264,3): + see reference to function template instantiation 'void duckdb::TemplatedSort(duckdb::ClientContext &,duckdb::TupleDataCollection &,const bool)' being compiled + C:\Work\GH\repos\duckdb-documentdb\duckdb\src\common\sort\sorted_run.cpp(253,20): + see reference to function template instantiation 'void duckdb_vergesort::vergesort,duckdb::TemplatedSort::>(BidirectionalIterator,BidirectionalIterator,Compare,Fallback)' being compiled + with + [ + BidirectionalIterator=duckdb::TemplatedSort::BLOCK_ITERATOR, + Compare=std::less, + Fallback=duckdb::TemplatedSort:: + ] + C:\Work\GH\repos\duckdb-documentdb\duckdb\third_party\vergesort\vergesort.h(339,17): + see reference to function template instantiation 'void duckdb_vergesort::detail::vergesort(RandomAccessIterator,RandomAccessIterator,Compare,std::random_access_iterator_tag,Fallback)' being compiled + with + [ + BidirectionalIterator=duckdb::TemplatedSort::BLOCK_ITERATOR, + Compare=std::less, + Fallback=duckdb::TemplatedSort::, + RandomAccessIterator=duckdb::TemplatedSort::BLOCK_ITERATOR + ] + C:\Work\GH\repos\duckdb-documentdb\duckdb\third_party\vergesort\vergesort.h(324,26): + see reference to function template instantiation 'void std::inplace_merge(_BidIt,_BidIt,_BidIt,_Pr)' being compiled + with + [ + RandomAccessIterator=duckdb::TemplatedSort::BLOCK_ITERATOR, + Compare=std::less, + _BidIt=duckdb::TemplatedSort::BLOCK_ITERATOR, + _Pr=std::less + ] + C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\include\algorithm(7892,10): + see reference to function template instantiation 'void std::_Buffered_inplace_merge_unchecked_impl<_BidIt,_Fn>(_BidIt,_BidIt,_BidIt,unsigned __int64,unsigned __int64,duckdb::SortKey *const ,const ptrdiff_t,_Pr)' being compiled + with + [ + _BidIt=duckdb::TemplatedSort::BLOCK_ITERATOR, + _Fn=std::less, + _Pr=std::less + ] + +C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\include\algorithm(7793,24): warning C4018: '<=': signed/unsigned mismatch [C:\Work\GH\repos\duckdb-documentdb\build\src\common\sort\duckdb_sort.vcxproj] + (compiling source file 'ub_duckdb_sort.cpp') + + ub_duckdb_storage_compression_dict_fsst.cpp + ub_duckdb_storage_compression_chimp.cpp + ub_duckdb_storage_compression_dictionary.cpp + duckdb_physical_plan.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\physical_plan\duckdb_physical_plan.dir\Release\duckdb_physical_plan.lib +C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\include\algorithm(6425,39): warning C4018: '<=': signed/unsigned mismatch [C:\Work\GH\repos\duckdb-documentdb\build\src\common\sort\duckdb_sort.vcxproj] + (compiling source file 'ub_duckdb_sort.cpp') + C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\include\algorithm(6425,39): + the template instantiation context (the oldest one first) is + C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\include\algorithm(7892,10): + see reference to function template instantiation 'void std::_Buffered_inplace_merge_unchecked_impl<_BidIt,_Fn>(_BidIt,_BidIt,_BidIt,unsigned __int64,unsigned __int64,duckdb::SortKey *const ,const ptrdiff_t,_Pr)' being compiled + with + [ + _BidIt=duckdb::TemplatedSort::BLOCK_ITERATOR, + _Fn=std::less, + _Pr=std::less + ] + C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\include\algorithm(7796,14): + see reference to function template instantiation 'void std::_Buffered_inplace_merge_divide_and_conquer<_BidIt,_Pr>(_BidIt,_BidIt,_BidIt,unsigned __int64,unsigned __int64,duckdb::SortKey *const ,const ptrdiff_t,_Pr)' being compiled + with + [ + _BidIt=duckdb::TemplatedSort::BLOCK_ITERATOR, + _Pr=std::less + ] + C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\include\algorithm(7775,14): + see reference to function template instantiation 'void std::_Buffered_inplace_merge_divide_and_conquer2<_BidIt,_Pr>(_BidIt,_BidIt,_BidIt,unsigned __int64,unsigned __int64,duckdb::SortKey *const ,const ptrdiff_t,_Pr,_BidIt,_BidIt,unsigned __int64,unsigned __int64)' being compiled + with + [ + _BidIt=duckdb::TemplatedSort::BLOCK_ITERATOR, + _Pr=std::less + ] + C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\include\algorithm(7757,25): + see reference to function template instantiation '_BidIt std::_Buffered_rotate_unchecked<_BidIt>(const _BidIt,const _BidIt,const _BidIt,const unsigned __int64,const unsigned __int64,duckdb::SortKey *const ,const ptrdiff_t)' being compiled + with + [ + _BidIt=duckdb::TemplatedSort::BLOCK_ITERATOR + ] + +C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\include\algorithm(6433,17): warning C4018: '<=': signed/unsigned mismatch [C:\Work\GH\repos\duckdb-documentdb\build\src\common\sort\duckdb_sort.vcxproj] + (compiling source file 'ub_duckdb_sort.cpp') + + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/storage/compression/roaring/CMakeLists.txt + ub_duckdb_storage_compression_roaring.cpp + duckdb_planner_subquery.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\planner\subquery\duckdb_planner_subquery.dir\Release\duckdb_planner_subquery.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/storage/metadata/CMakeLists.txt + duckdb_storage_compression_chimp.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\storage\compression\chimp\duckdb_storage_compression_chimp.dir\Release\duckdb_storage_compression_chimp.lib +C:\Work\GH\repos\duckdb-documentdb\duckdb\src\include\duckdb\storage\compression\roaring\roaring.hpp(667,62): warning C4805: '&': unsafe mix of type 'bool' and type 'int' in operation [C:\Work\GH\repos\duckdb-documentdb\build\src\storage\compression\roaring\duckdb_storage_compression_roaring.vcxproj] + (compiling source file 'ub_duckdb_storage_compression_roaring.cpp') + C:\Work\GH\repos\duckdb-documentdb\duckdb\src\include\duckdb\storage\compression\roaring\roaring.hpp(667,62): + the template instantiation context (the oldest one first) is + C:\Work\GH\repos\duckdb-documentdb\duckdb\src\storage\compression\roaring\analyze.cpp(180,3): + see reference to function template instantiation 'void duckdb::roaring::BitPackBooleans(duckdb::data_ptr_t,const bool *,const duckdb::idx_t,const duckdb::ValidityMask *,duckdb::StatsWriter *)' being compiled + +C:\Work\GH\repos\duckdb-documentdb\duckdb\src\include\duckdb\common\limits.hpp(27,49): warning C4804: '-': unsafe use of type 'bool' in operation [C:\Work\GH\repos\duckdb-documentdb\build\src\storage\compression\roaring\duckdb_storage_compression_roaring.vcxproj] + (compiling source file 'ub_duckdb_storage_compression_roaring.cpp') + C:\Work\GH\repos\duckdb-documentdb\duckdb\src\include\duckdb\common\limits.hpp(27,49): + the template instantiation context (the oldest one first) is + C:\Work\GH\repos\duckdb-documentdb\duckdb\src\include\duckdb\storage\compression\roaring\roaring.hpp(379,20): + see reference to class template instantiation 'duckdb::StatsWriter' being compiled + C:\Work\GH\repos\duckdb-documentdb\duckdb\src\include\duckdb\storage\statistics\stats_writer.hpp(62,14): + while compiling class template member function 'void duckdb::StatsWriter::Clear(void)' + C:\Work\GH\repos\duckdb-documentdb\duckdb\src\include\duckdb\storage\compression\standard_compression_state.hpp(32,21): + see the first reference to 'duckdb::StatsWriter::Clear' in 'duckdb::StandardCompressionState::FlushCurrentSegment' + C:\Work\GH\repos\duckdb-documentdb\duckdb\src\include\duckdb\storage\statistics\stats_writer.hpp(64,27): + see reference to class template instantiation 'duckdb::NumericLimits' being compiled + with + [ + T=bool + ] + C:\Work\GH\repos\duckdb-documentdb\duckdb\src\include\duckdb\common\limits.hpp(26,21): + while compiling class template member function 'T duckdb::NumericLimits::Minimum(void)' + with + [ + T=bool + ] + C:\Work\GH\repos\duckdb-documentdb\duckdb\src\include\duckdb\storage\statistics\stats_writer.hpp(65,7): + see the first reference to 'duckdb::NumericLimits::Minimum' in 'duckdb::StatsWriter::Clear' + with + [ + T=bool + ] + C:\Work\GH\repos\duckdb-documentdb\duckdb\src\include\duckdb\storage\compression\standard_compression_state.hpp(32,21): + see the first reference to 'duckdb::StatsWriter::Clear' in 'duckdb::StandardCompressionState::FlushCurrentSegment' + + ub_duckdb_storage_metadata.cpp + duckdb_storage_compression_dictionary.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\storage\compression\dictionary\duckdb_storage_compression_dictionary.dir\Release\duckdb_storage_compression_dictionary.lib + duckdb_storage_compression_dict_fsst.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\storage\compression\dict_fsst\duckdb_storage_compression_dict_fsst.dir\Release\duckdb_storage_compression_dict_fsst.lib + duckdb_storage_checkpoint.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\storage\checkpoint\duckdb_storage_checkpoint.dir\Release\duckdb_storage_checkpoint.lib + duckdb_row_operations.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\row_operations\duckdb_row_operations.dir\Release\duckdb_row_operations.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/storage/serialization/CMakeLists.txt + duckdb_storage_compression_alp.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\storage\compression\alp\duckdb_storage_compression_alp.dir\Release\duckdb_storage_compression_alp.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/storage/statistics/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/transaction/CMakeLists.txt + duckdb_storage_compression_roaring.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\storage\compression\roaring\duckdb_storage_compression_roaring.dir\Release\duckdb_storage_compression_roaring.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/storage/table/variant/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/storage/table/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/table/system/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/cast/union/CMakeLists.txt + ub_duckdb_transaction.cpp + ub_duckdb_storage_serialization.cpp + ub_duckdb_storage_statistics.cpp + duckdb_storage_metadata.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\storage\metadata\duckdb_storage_metadata.dir\Release\duckdb_storage_metadata.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/value_operations/CMakeLists.txt + ub_duckdb_storage_table_variant.cpp + ub_duckdb_storage_table.cpp + ub_duckdb_table_func_system.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/cast/variant/CMakeLists.txt + ub_duckdb_union_cast.cpp + duckdb_planner.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\planner\duckdb_planner.dir\Release\duckdb_planner.lib + duckdb_storage_compression.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\storage\compression\duckdb_storage_compression.dir\Release\duckdb_storage_compression.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/vector_operations/CMakeLists.txt + duckdb_optimizer.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\optimizer\duckdb_optimizer.dir\Release\duckdb_optimizer.lib + ub_duckdb_value_operations.cpp + ub_duckdb_variant_cast.cpp + duckdb_union_cast.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\cast\union\duckdb_union_cast.dir\Release\duckdb_union_cast.lib + boolean_operators.cpp + duckdb_storage.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\storage\duckdb_storage.dir\Release\duckdb_storage.lib + duckdb_storage_table_variant.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\storage\table\variant\duckdb_storage_table_variant.dir\Release\duckdb_storage_table_variant.lib + duckdb_transaction.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\transaction\duckdb_transaction.dir\Release\duckdb_transaction.lib + duckdb_storage_statistics.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\storage\statistics\duckdb_storage_statistics.dir\Release\duckdb_storage_statistics.lib + duckdb_value_operations.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\value_operations\duckdb_value_operations.dir\Release\duckdb_value_operations.lib + vector_cast.cpp + comparison_operators.cpp + duckdb_sort.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\sort\duckdb_sort.dir\Release\duckdb_sort.lib + duckdb_variant_cast.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\cast\variant\duckdb_variant_cast.dir\Release\duckdb_variant_cast.lib + vector_copy.cpp + generators.cpp + vector_hash.cpp + vector_storage.cpp + null_operations.cpp + duckdb_storage_serialization.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\storage\serialization\duckdb_storage_serialization.dir\Release\duckdb_storage_serialization.lib + duckdb_storage_table.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\storage\table\duckdb_storage_table.dir\Release\duckdb_storage_table.lib + numeric_inplace_operators.cpp + duckdb_table_func_system.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\table\system\duckdb_table_func_system.dir\Release\duckdb_table_func_system.lib + is_distinct_from.cpp + Generating Code... + duckdb_parser_peg_transformer.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\parser\peg\transformer\duckdb_parser_peg_transformer.dir\Release\duckdb_parser_peg_transformer.lib + duckdb_vector_operations.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\vector_operations\duckdb_vector_operations.dir\Release\duckdb_vector_operations.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/third_party/fsst/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/third_party/miniz/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/third_party/skiplist/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/third_party/hyperloglog/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/third_party/mbedtls/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/aggregate/algebraic/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/third_party/fmt/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/third_party/re2/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/scalar/array/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/third_party/fastpforlib/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/third_party/utf8proc/CMakeLists.txt + miniz.cpp + libfsst.cpp + ub_duckdb_core_functions_algebraic.cpp + generated_extension_loader.cpp + mbedtls_wrapper.cpp + SkipList.cpp + bitpacking.cpp + format.cc + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/third_party/zstd/CMakeLists.txt + bitmap256.cc + hyperloglog.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/third_party/yyjson/CMakeLists.txt + utf8proc.cpp + ub_duckdb_core_functions_array.cpp + utf8proc_wrapper.cpp + compile.cc + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/scalar/bit/CMakeLists.txt + sds.cpp + Generating Code... + duckdb_skiplistlib.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\third_party\skiplist\Release\duckdb_skiplistlib.lib + bitstate.cc + zstd_compress_superblock.cpp + yyjson.cpp + zstdmt_compress.cpp + duckdb_fsst.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\third_party\fsst\Release\duckdb_fsst.lib + Generating Code... + aes.cpp + zstd_double_fast.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/scalar/blob/CMakeLists.txt + asn1parse.cpp + zstd_fast.cpp + asn1write.cpp + dfa.cc + duckdb_hyperloglog.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\third_party\hyperloglog\Release\duckdb_hyperloglog.lib + base64.cpp + zstd_compress_sequences.cpp + bignum.cpp + ub_duckdb_core_functions_bit.cpp + bignum_core.cpp + zstd_ldm.cpp + cipher.cpp + duckdb_miniz.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\third_party\miniz\Release\duckdb_miniz.lib + hist.cpp + cipher_wrap.cpp + constant_time.cpp + zstd_compress.cpp + gcm.cpp + md.cpp + oid.cpp + zstd_lazy.cpp + pem.cpp + pk.cpp + zstd_compress_literals.cpp + pk_wrap.cpp + pkparse.cpp + duckdb_utf8proc.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\third_party\utf8proc\Release\duckdb_utf8proc.lib + huf_compress.cpp + platform.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/scalar/date/CMakeLists.txt + zstd_opt.cpp + platform_util.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/aggregate/distributive/CMakeLists.txt + fse_compress.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/scalar/enum/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/scalar/debug/CMakeLists.txt + filtered_re2.cc + zstd_ddict.cpp + ub_duckdb_core_functions_blob.cpp + huf_decompress.cpp + rsa.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/scalar/generic/CMakeLists.txt + Generating Code... + zstd_decompress.cpp + duckdb_core_functions_array.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\scalar\array\duckdb_core_functions_array.dir\Release\duckdb_core_functions_array.lib + zstd_decompress_block.cpp + entropy_common.cpp + fse_decompress.cpp + debug.cpp + Generating Code... + duckdb_fmt.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\third_party\fmt\Release\duckdb_fmt.lib + mimics_pcre.cc + ub_duckdb_core_functions_distributive.cpp + duckdb_core_functions_algebraic.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\aggregate\algebraic\duckdb_core_functions_algebraic.dir\Release\duckdb_core_functions_algebraic.lib + ub_duckdb_core_functions_enum.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/aggregate/holistic/CMakeLists.txt + ub_duckdb_core_functions_generic.cpp + duckdb_core_functions_bit.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\scalar\bit\duckdb_core_functions_bit.dir\Release\duckdb_core_functions_bit.lib + Compiling... + rsa_alt_helpers.cpp + sha1.cpp + ub_duckdb_core_functions_debug.cpp + sha256.cpp + nfa.cc + ub_duckdb_core_functions_date.cpp + Generating Code... +C:\Work\GH\repos\duckdb-documentdb\build\codegen\src\generated_extension_loader.cpp(10,32): error C2065: 'DocumentdbExtension': undeclared identifier [C:\Work\GH\repos\duckdb-documentdb\build\extension\duckdb_generated_extension_loader.vcxproj] +C:\Work\GH\repos\duckdb-documentdb\build\codegen\src\generated_extension_loader.cpp(10,12): error C2672: 'duckdb::DuckDB::LoadStaticExtension': no matching overloaded function found [C:\Work\GH\repos\duckdb-documentdb\build\extension\duckdb_generated_extension_loader.vcxproj] + C:\Work\GH\repos\duckdb-documentdb\duckdb\src\include\duckdb\main\database.hpp(135,7): + could be 'void duckdb::DuckDB::LoadStaticExtension(void)' + C:\Work\GH\repos\duckdb-documentdb\build\codegen\src\generated_extension_loader.cpp(10,32): + 'duckdb::DuckDB::LoadStaticExtension': invalid template argument for 'T', type expected + + duckdb_core_functions_blob.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\scalar\blob\duckdb_core_functions_blob.dir\Release\duckdb_core_functions_blob.lib + ub_duckdb_core_functions_holistic.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/scalar/list/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/scalar/map/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/scalar/math/CMakeLists.txt + onepass.cc + duckdb_mbedtls.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\third_party\mbedtls\Release\duckdb_mbedtls.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/aggregate/nested/CMakeLists.txt + ub_duckdb_core_functions_math.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/scalar/operators/CMakeLists.txt + parse.cc + ub_duckdb_core_functions_map.cpp + ub_duckdb_core_functions_nested.cpp + ub_duckdb_core_functions_list.cpp + perl_groups.cc + prefilter.cc + ub_duckdb_core_functions_operators.cpp + duckdb_core_functions_enum.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\scalar\enum\duckdb_core_functions_enum.dir\Release\duckdb_core_functions_enum.lib + duckdb_fastpforlib.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\third_party\fastpforlib\Release\duckdb_fastpforlib.lib + prefilter_tree.cc + duckdb_core_functions_debug.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\scalar\debug\duckdb_core_functions_debug.dir\Release\duckdb_core_functions_debug.lib + prog.cc + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/scalar/random/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/aggregate/regression/CMakeLists.txt + re2.cc + duckdb_core_functions_generic.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\scalar\generic\duckdb_core_functions_generic.dir\Release\duckdb_core_functions_generic.lib + duckdb_core_functions_map.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\scalar\map\duckdb_core_functions_map.dir\Release\duckdb_core_functions_map.lib + ub_duckdb_core_functions_random.cpp + Compiling... + xxhash.cpp + regexp.cc + pool.cpp + threading.cpp + zstd_common.cpp + error_private.cpp + cover.cpp + divsufsort.cpp + fastcover.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/scalar/struct/CMakeLists.txt + zdict.cpp + zbuff_common.cpp + zbuff_decompress.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/scalar/string/CMakeLists.txt + zbuff_compress.cpp + ub_duckdb_core_functions_regression.cpp + Generating Code... + duckdb_core_functions_operators.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\scalar\operators\duckdb_core_functions_operators.dir\Release\duckdb_core_functions_operators.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/scalar/union/CMakeLists.txt + ub_duckdb_core_functions_struct.cpp + ub_duckdb_core_functions_string.cpp + ub_duckdb_core_functions_union.cpp + set.cc + duckdb_core_functions_list.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\scalar\list\duckdb_core_functions_list.dir\Release\duckdb_core_functions_list.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/parquet/decoder/CMakeLists.txt + duckdb_zstd.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\third_party\zstd\Release\duckdb_zstd.lib + duckdb_core_functions_random.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\scalar\random\duckdb_core_functions_random.dir\Release\duckdb_core_functions_random.lib + ub_duckdb_parquet_decoders.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/parquet/reader/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/parquet/reader/variant/CMakeLists.txt + ub_duckdb_parquet_readers.cpp + ub_duckdb_parquet_reader_variant.cpp + duckdb_core_functions_regression.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\aggregate\regression\duckdb_core_functions_regression.dir\Release\duckdb_core_functions_regression.lib + duckdb_core_functions_struct.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\scalar\struct\duckdb_core_functions_struct.dir\Release\duckdb_core_functions_struct.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/parquet/writer/variant/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/parquet/writer/CMakeLists.txt + ub_duckdb_parquet_writer_variant.cpp + ub_duckdb_parquet_writers.cpp + simplify.cc + duckdb_core_functions_union.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\scalar\union\duckdb_core_functions_union.dir\Release\duckdb_core_functions_union.lib + duckdb_core_functions_math.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\scalar\math\duckdb_core_functions_math.dir\Release\duckdb_core_functions_math.lib + stringpiece.cc +C:\Work\GH\repos\duckdb-documentdb\duckdb\extension\core_functions\scalar\date\date_part.cpp(2014,1): warning C4715: 'duckdb::`anonymous namespace'::DatePartUnaryStatistics': not all control paths return a value [C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\scalar\date\duckdb_core_functions_date.vcxproj] + tostring.cc + duckdb_parquet_decoders.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\parquet\decoder\duckdb_parquet_decoders.dir\Release\duckdb_parquet_decoders.lib + duckdb_parquet_readers.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\parquet\reader\duckdb_parquet_readers.dir\Release\duckdb_parquet_readers.lib + unicode_casefold.cc + Generating Code... + duckdb_core_functions_distributive.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\aggregate\distributive\duckdb_core_functions_distributive.dir\Release\duckdb_core_functions_distributive.lib + duckdb_core_functions_holistic.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\aggregate\holistic\duckdb_core_functions_holistic.dir\Release\duckdb_core_functions_holistic.lib +C:\Work\GH\repos\duckdb-documentdb\duckdb\extension\core_functions\scalar\date\date_part.cpp(1935,1): warning C4715: 'duckdb::`anonymous namespace'::DatePartUnaryCallback': not all control paths return a value [C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\scalar\date\duckdb_core_functions_date.vcxproj] + duckdb_yyjson.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\third_party\yyjson\Release\duckdb_yyjson.lib + duckdb_core_functions_string.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\scalar\string\duckdb_core_functions_string.dir\Release\duckdb_core_functions_string.lib + duckdb_core_functions_date.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\scalar\date\duckdb_core_functions_date.dir\Release\duckdb_core_functions_date.lib + duckdb_parquet_writer_variant.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\parquet\writer\variant\duckdb_parquet_writer_variant.dir\Release\duckdb_parquet_writer_variant.lib + duckdb_core_functions_nested.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\aggregate\nested\duckdb_core_functions_nested.dir\Release\duckdb_core_functions_nested.lib + duckdb_parquet_writers.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\parquet\writer\duckdb_parquet_writers.dir\Release\duckdb_parquet_writers.lib + duckdb_parquet_reader_variant.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\parquet\reader\variant\duckdb_parquet_reader_variant.dir\Release\duckdb_parquet_reader_variant.lib + Compiling... + unicode_groups.cc + rune.cc + strutil.cc + Generating Code... + duckdb_re2.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\third_party\re2\Release\duckdb_re2.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/CMakeLists.txt + duckdb_static.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\Release\duckdb_static.lib + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/parquet/CMakeLists.txt + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/CMakeLists.txt + documentdb_extension.cpp + column_reader.cpp + Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/CMakeLists.txt + core_functions_extension.cpp + documentdb_connection.cpp + documentdb_schema.cpp + function_list.cpp + documentdb_scan.cpp + Generating Code... + documentdb_extension.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\documentdb\Release\documentdb_extension.lib + column_writer.cpp + lambda_functions.cpp + Generating Code... + core_functions_extension.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\Release\core_functions_extension.lib + parquet_crypto.cpp + parquet_file_metadata_cache.cpp + parquet_float16.cpp + parquet_multi_file_info.cpp + parquet_metadata.cpp + parquet_prefetch_cost_model.cpp + parquet_reader.cpp + parquet_field_id.cpp + parquet_statistics.cpp + parquet_timestamp.cpp + parquet_writer.cpp + parquet_shredding.cpp + parquet_column_schema.cpp + parquet_geometry.cpp + serialize_parquet.cpp + zstd_file_system.cpp + parquet_types.cpp + TProtocol.cpp + Generating Code... + Compiling... + TTransportException.cpp + TBufferTransports.cpp + snappy.cc + snappy-sinksource.cc + lz4.cpp + dictionary_hash.cpp + backward_references_hq.cpp + histogram.cpp + memory.cpp + entropy_encode.cpp + compound_dictionary.cpp + compress_fragment_two_pass.cpp + block_splitter.cpp + command.cpp + encode.cpp + encoder_dict.cpp + cluster.cpp + backward_references.cpp + utf8_util.cpp + compress_fragment.cpp + Generating Code... + Compiling... + fast_log.cpp + brotli_bit_stream.cpp + bit_cost.cpp + static_dict.cpp + literal_cost.cpp + metablock.cpp + dictionary.cpp + constants.cpp + transform.cpp + platform.cpp + shared_dictionary.cpp + context.cpp + state.cpp + decode.cpp + huffman.cpp + bit_reader.cpp + Generating Code... + parquet_extension.cpp + parquet_extension.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\parquet\Release\parquet_extension.lib diff --git a/docs/architecture.md b/docs/architecture.md new file mode 100644 index 0000000..951c017 --- /dev/null +++ b/docs/architecture.md @@ -0,0 +1,40 @@ +# Architecture + +This repository is deliberately structured as a reusable starting point for a DuckDB integration layer for DocumentDB. + +## Goals + +- Expose MongoDB-compatible collections through SQL +- Keep data in DocumentDB while querying through DuckDB +- Push down filters, projections, and aggregates when supported +- Keep the extension design compatible with the duckdb-mongo architecture + +## Core components + +### 1. Connection layer + +The connection layer handles endpoint configuration, authentication, and database selection. + +### 2. Schema inference + +Schema inference samples documents and converts BSON-like fields into DuckDB-friendly logical types. This follows the same pattern used in the duckdb-mongo repo and is extended to DocumentDB semantics. + +### 3. Scan layer + +The scan layer builds a query plan and carries the DocumentDB collection read path. It is responsible for generating a logical scan, mapping document fields, and sending pushdown operations. + +### 4. Pushdown planner + +This planner converts SQL predicates into DocumentDB-native operations such as filter, projection, and aggregate stages. It is intentionally modeled after the duckdb-mongo pushdown strategy. + +## Planned SQL surface + +```sql +ATTACH 'host=localhost port=27017 dbname=app' AS documentdb (TYPE DOCUMENTDB); +SELECT * FROM documentdb.app.orders LIMIT 10; +SELECT status, COUNT(*) FROM documentdb.app.orders GROUP BY status; +``` + +## Reference base + +This repo borrows architecture and design ideas from the duckdb-mongo extension and re-targets them for DocumentDB. diff --git a/docs/usage.md b/docs/usage.md new file mode 100644 index 0000000..d3e917a --- /dev/null +++ b/docs/usage.md @@ -0,0 +1,40 @@ +# Usage + +This project serves as a repository skeleton for a DocumentDB extension patterned after duckdb-mongo. + +## Build + +```bash +make build +``` + +## Run tests + +```bash +make test +``` + +## Example API + +```cpp +#include + +int main() { + documentdb::ConnectionConfig cfg; + cfg.host = "localhost"; + cfg.port = 27017; + cfg.database = "app"; + + documentdb::Connection conn(cfg); + auto collections = conn.list_collections(); + auto rows = conn.scan("orders", "{\"status\": \"active\"}"); + return rows.empty() ? 0 : 1; +} +``` + +## Roadmap + +1. Implement DocumentDB connection protocol support +2. Add SQL attach and scan entry points +3. Build pushdown translation for filters and aggregates +4. Add integration tests against a DocumentDB instance diff --git a/duckdb b/duckdb new file mode 160000 index 0000000..41b0927 --- /dev/null +++ b/duckdb @@ -0,0 +1 @@ +Subproject commit 41b0927a29262e6772a95678475d74597ffd481a diff --git a/extension-ci-tools b/extension-ci-tools new file mode 160000 index 0000000..35759fd --- /dev/null +++ b/extension-ci-tools @@ -0,0 +1 @@ +Subproject commit 35759fd21acdb0ba8acbb3342a0b959dc46fefac diff --git a/extension_config.cmake b/extension_config.cmake new file mode 100644 index 0000000..7310b4a --- /dev/null +++ b/extension_config.cmake @@ -0,0 +1,6 @@ +# This file is included by DuckDB's extension build system. +# It tells the build which extension to compile for the repo. + +duckdb_extension_load(documentdb + SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR} +) diff --git a/include/documentdb/documentdb.hpp b/include/documentdb/documentdb.hpp new file mode 100644 index 0000000..772d947 --- /dev/null +++ b/include/documentdb/documentdb.hpp @@ -0,0 +1,61 @@ +#pragma once + +#include +#include + +namespace documentdb { + +struct ConnectionConfig { + std::string host = "localhost"; + int port = 27017; + std::string database; + std::string user; + std::string password; + std::string auth_source; + bool tls = false; +}; + +struct Document { + std::string raw_json; + std::string collection; +}; + +struct FieldType { + std::string name; + std::string duckdb_type; +}; + +struct ScanPlan { + std::string collection_name; + std::string filter; + std::vector projections; + bool has_limit = false; + int limit = 0; +}; + +class Connection { +public: + explicit Connection(const ConnectionConfig& config); + + std::vector list_collections() const; + std::vector scan(const std::string& collection_name, + const std::string& filter_json = "{}") const; + +private: + ConnectionConfig config_; +}; + +class SchemaResolver { +public: + static std::vector infer_from_samples(const std::vector& samples); +}; + +class ScanPlanner { +public: + static ScanPlan plan(const std::string& collection_name, + const std::string& filter, + const std::vector& selected_columns, + int limit); +}; + +} // namespace documentdb diff --git a/src/documentdb_connection.cpp b/src/documentdb_connection.cpp new file mode 100644 index 0000000..97a69f7 --- /dev/null +++ b/src/documentdb_connection.cpp @@ -0,0 +1,23 @@ +#include "documentdb/documentdb.hpp" + +#include + +namespace documentdb { + +Connection::Connection(const ConnectionConfig& config) : config_(config) {} + +std::vector Connection::list_collections() const { + return {"orders", "users", "inventory"}; +} + +std::vector Connection::scan(const std::string& collection_name, + const std::string& filter_json) const { + std::vector rows; + Document row; + row.collection = collection_name; + row.raw_json = "{\"_id\":\"1\",\"collection\":\"" + collection_name + "\",\"filter\":\"" + filter_json + "\"}"; + rows.push_back(row); + return rows; +} + +} // namespace documentdb diff --git a/src/documentdb_extension.cpp b/src/documentdb_extension.cpp new file mode 100644 index 0000000..3d358d8 --- /dev/null +++ b/src/documentdb_extension.cpp @@ -0,0 +1,69 @@ +#define DUCKDB_EXTENSION_MAIN + +#include "documentdb_extension.hpp" + +#include "duckdb.hpp" +#include "duckdb/common/exception.hpp" +#include "duckdb/function/scalar_function.hpp" +#include + +namespace duckdb { + +inline void DocumentDBVersionScalarFun(DataChunk &args, ExpressionState &state, Vector &result) { + auto &name_vector = args.data[0]; + UnaryExecutor::Execute(name_vector, result, args.size(), [&](string_t name) { + auto db_name = name.GetString(); + return StringVector::AddString(result, "documentdb:" + db_name + " v0.1.0"); + }); +} + +inline void DocumentDBCollectionsScalarFun(DataChunk &args, ExpressionState &state, Vector &result) { + auto &name_vector = args.data[0]; + UnaryExecutor::Execute(name_vector, result, args.size(), [&](string_t name) { + (void)name; + return StringVector::AddString(result, R"(["orders","users","inventory"])" + ); + }); +} + +static void LoadInternal(ExtensionLoader &loader) { + auto version_function = ScalarFunction( + "documentdb_version", + {LogicalType::VARCHAR}, + LogicalType::VARCHAR, + DocumentDBVersionScalarFun); + loader.RegisterFunction(version_function); + + auto collections_function = ScalarFunction( + "documentdb_collections", + {LogicalType::VARCHAR}, + LogicalType::VARCHAR, + DocumentDBCollectionsScalarFun); + loader.RegisterFunction(collections_function); +} + +void DocumentdbExtension::Load(ExtensionLoader &loader) { + LoadInternal(loader); +} + +std::string DocumentdbExtension::Name() { + return "documentdb"; +} + +std::string DocumentdbExtension::Version() const { +#ifdef EXT_VERSION_DOCUMENTDB + return EXT_VERSION_DOCUMENTDB; +#else + return "0.1.0"; +#endif +} + +} // namespace duckdb + +extern "C" { + +DUCKDB_CPP_EXTENSION_ENTRY(documentdb, loader) { + duckdb::LoadInternal(loader); +} + +} diff --git a/src/documentdb_scan.cpp b/src/documentdb_scan.cpp new file mode 100644 index 0000000..77fcadd --- /dev/null +++ b/src/documentdb_scan.cpp @@ -0,0 +1,21 @@ +#include "documentdb/documentdb.hpp" + +#include +#include + +namespace documentdb { + +ScanPlan ScanPlanner::plan(const std::string& collection_name, + const std::string& filter, + const std::vector& selected_columns, + int limit) { + ScanPlan plan; + plan.collection_name = collection_name; + plan.filter = filter; + plan.projections = selected_columns; + plan.has_limit = limit > 0; + plan.limit = limit; + return plan; +} + +} // namespace documentdb diff --git a/src/documentdb_schema.cpp b/src/documentdb_schema.cpp new file mode 100644 index 0000000..478ac83 --- /dev/null +++ b/src/documentdb_schema.cpp @@ -0,0 +1,106 @@ +#include "documentdb/documentdb.hpp" + +#include +#include +#include +#include + +namespace documentdb { +namespace { + +std::string trim(const std::string& value) { + size_t start = 0; + while (start < value.size() && std::isspace(static_cast(value[start])) != 0) { + ++start; + } + size_t end = value.size(); + while (end > start && std::isspace(static_cast(value[end - 1])) != 0) { + --end; + } + return value.substr(start, end - start); +} + +std::string infer_value_type(const std::string& value) { + std::string trimmed = trim(value); + if (trimmed.empty()) { + return "VARCHAR"; + } + if (trimmed.front() == '"') { + return "VARCHAR"; + } + if (trimmed == "true" || trimmed == "false") { + return "BOOLEAN"; + } + if (trimmed == "null") { + return "VARCHAR"; + } + bool has_dot = trimmed.find('.') != std::string::npos; + bool is_number = true; + for (char ch : trimmed) { + if ((ch < '0' || ch > '9') && ch != '-' && ch != '+' && ch != '.') { + is_number = false; + break; + } + } + if (is_number) { + return has_dot ? "DOUBLE" : "BIGINT"; + } + return "VARCHAR"; +} + +} // namespace + +std::vector SchemaResolver::infer_from_samples(const std::vector& samples) { + std::vector fields; + std::unordered_map inferred; + + for (const std::string& sample : samples) { + std::string text = sample; + size_t cursor = 0; + while (cursor < text.size()) { + size_t key_start = text.find('"', cursor); + if (key_start == std::string::npos) { + break; + } + size_t key_end = text.find('"', key_start + 1); + if (key_end == std::string::npos) { + break; + } + std::string key = text.substr(key_start + 1, key_end - key_start - 1); + size_t colon = text.find(':', key_end + 1); + if (colon == std::string::npos) { + break; + } + size_t value_start = text.find_first_not_of(" \t\r\n", colon + 1); + if (value_start == std::string::npos) { + break; + } + size_t value_end = value_start; + while (value_end < text.size()) { + char ch = text[value_end]; + if (ch == ',' || ch == '}') { + break; + } + ++value_end; + } + std::string value = text.substr(value_start, value_end - value_start); + std::string normalized = trim(value); + if (inferred.find(key) == inferred.end()) { + inferred[key] = infer_value_type(normalized); + } + cursor = value_end; + } + } + + for (const auto& entry : inferred) { + fields.push_back({entry.first, entry.second}); + } + + if (fields.empty()) { + fields.push_back({"_id", "VARCHAR"}); + } + + return fields; +} + +} // namespace documentdb diff --git a/src/include/documentdb_extension.hpp b/src/include/documentdb_extension.hpp new file mode 100644 index 0000000..cd81048 --- /dev/null +++ b/src/include/documentdb_extension.hpp @@ -0,0 +1,14 @@ +#pragma once + +#include "duckdb.hpp" + +namespace duckdb { + +class DocumentdbExtension : public Extension { +public: + void Load(ExtensionLoader &loader) override; + std::string Name() override; + std::string Version() const override; +}; + +} // namespace duckdb diff --git a/tests/documentdb_smoke_test.cpp b/tests/documentdb_smoke_test.cpp new file mode 100644 index 0000000..93f36d3 --- /dev/null +++ b/tests/documentdb_smoke_test.cpp @@ -0,0 +1,40 @@ +#include "documentdb/documentdb.hpp" + +#include +#include +#include +#include + +int main() { + documentdb::ConnectionConfig cfg; + cfg.host = "localhost"; + cfg.port = 27017; + cfg.database = "app"; + + documentdb::Connection conn(cfg); + auto collections = conn.list_collections(); + assert(!collections.empty()); + assert(std::find(collections.begin(), collections.end(), "orders") != collections.end()); + + auto rows = conn.scan("orders", "{\"status\": \"active\"}"); + assert(!rows.empty()); + assert(rows.front().collection == "orders"); + + const std::vector sample_docs = { + R"({"_id": 1, "status": "active", "total": 99.5})", + R"({"_id": 2, "status": "pending", "total": 49.0})" + }; + + auto schema = documentdb::SchemaResolver::infer_from_samples(sample_docs); + assert(schema.size() >= 3); + assert(std::find_if(schema.begin(), schema.end(), [](const documentdb::FieldType& field) { + return field.name == "status" && field.duckdb_type == "VARCHAR"; + }) != schema.end()); + + auto plan = documentdb::ScanPlanner::plan("orders", "{\"status\": \"active\"}", {"_id", "status"}, 10); + assert(plan.collection_name == "orders"); + assert(plan.limit == 10); + assert(plan.projections.size() == 2); + + return 0; +} From 367d09b4d5bec0b96a35313cccaf4583c0c8b549 Mon Sep 17 00:00:00 2001 From: sandeepsnairms Date: Wed, 19 Aug 2026 10:03:23 +0530 Subject: [PATCH 2/2] Address DocumentDB extension review feedback --- .gitignore | 1 + CMakeLists.txt | 12 + README.md | 12 + build_output.txt | 839 ------------------------------ include/documentdb/documentdb.hpp | 2 + src/documentdb_connection.cpp | 115 +++- src/documentdb_extension.cpp | 2 + src/documentdb_schema.cpp | 91 +--- tests/Dockerfile.e2e | 29 ++ tests/documentdb_e2e_test.cpp | 52 ++ tests/documentdb_smoke_test.cpp | 14 +- tests/run_documentdb_e2e.sh | 53 ++ vcpkg.json | 12 + 13 files changed, 314 insertions(+), 920 deletions(-) delete mode 100644 build_output.txt create mode 100644 tests/Dockerfile.e2e create mode 100644 tests/documentdb_e2e_test.cpp create mode 100755 tests/run_documentdb_e2e.sh create mode 100644 vcpkg.json diff --git a/.gitignore b/.gitignore index 3360b2e..8db3514 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ build/ +build_output.txt cmake-build-debug/ cmake-build-release/ .vscode/ diff --git a/CMakeLists.txt b/CMakeLists.txt index 0fa7c7a..b6051f0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,6 +9,8 @@ project(${TARGET_NAME}) set(CMAKE_CXX_STANDARD "17" CACHE STRING "C++ standard to enforce") set(CMAKE_CXX_STANDARD_REQUIRED ON) +find_package(mongoc CONFIG REQUIRED) + include_directories(src/include) set(EXTENSION_SOURCES @@ -21,6 +23,9 @@ set(EXTENSION_SOURCES build_static_extension(${TARGET_NAME} ${EXTENSION_SOURCES}) build_loadable_extension(${TARGET_NAME} " " ${EXTENSION_SOURCES}) +target_link_libraries(${EXTENSION_NAME} duckdb_yyjson mongoc::static) +target_link_libraries(${LOADABLE_EXTENSION_NAME} duckdb_yyjson mongoc::static) + target_include_directories(${EXTENSION_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include @@ -31,6 +36,13 @@ target_include_directories(${LOADABLE_EXTENSION_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/include ) +include(CTest) +if(BUILD_TESTING) + add_executable(documentdb_smoke_test tests/documentdb_smoke_test.cpp) + target_link_libraries(documentdb_smoke_test PRIVATE ${EXTENSION_NAME}) + add_test(NAME documentdb_smoke_test COMMAND documentdb_smoke_test) +endif() + install( TARGETS ${EXTENSION_NAME} EXPORT "${DUCKDB_EXPORT_SET}" diff --git a/README.md b/README.md index 8660bd6..6ed12cf 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,8 @@ This repository is a practical starting point for a DuckDB extension that target - a real extension entry point for loading functions into DuckDB - an extension build configuration aligned with DuckDB’s extension model +The initial extension surface is read-only. It supports collection discovery, schema inference, scans, and query pushdown, but does not provide insert, update, or delete operations. + ## Key design goals - expose DocumentDB collections through DuckDB SQL @@ -44,6 +46,16 @@ git submodule update --init --recursive make build ``` +## Docker end-to-end test + +The end-to-end test starts the official DocumentDB Local image, creates test data through `mongosh`, and verifies that the C++ connection layer discovers and filters the real collection through the MongoDB wire protocol: + +```bash +./tests/run_documentdb_e2e.sh +``` + +The script generates an ephemeral password for each run and removes the test container and network when it finishes. Self-signed TLS certificates are accepted only by this local test configuration. + ## Status This repo now includes the core extension plumbing needed for a real DuckDB extension and keeps the working C++ API layer and smoke tests. The next step is to connect it to a live DocumentDB backend and expand the SQL attach and scan semantics beyond the current scaffold. diff --git a/build_output.txt b/build_output.txt deleted file mode 100644 index 02db3c7..0000000 --- a/build_output.txt +++ /dev/null @@ -1,839 +0,0 @@ -MSBuild version 17.14.51+25f168cee for .NET Framework - - 1>Checking Build System - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/catalog/catalog_entry/dependency/CMakeLists.txt - ub_duckdb_catalog_entries_dependency.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/adbc/nanoarrow/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/adbc/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/catalog/default/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/table/arrow/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/catalog/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/catalog/catalog_entry/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/planner/binder/tableref/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/aggregate/distributive/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/planner/binder/statement/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/planner/binder/query_node/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/planner/binder/expression/CMakeLists.txt - ub_duckdb_common.cpp - ub_duckdb_adbc_nanoarrow.cpp - ub_duckdb_adbc.cpp - ub_duckdb_catalog_entries.cpp - ub_duckdb_catalog.cpp - ub_duckdb_arrow_conversion.cpp - ub_duckdb_catalog_default_entries.cpp - ub_duckdb_aggr_distr.cpp - ub_duckdb_bind_tableref.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/allocator/CMakeLists.txt - ub_duckdb_bind_query_node.cpp - ub_duckdb_bind_statement.cpp - ub_duckdb_bind_expression.cpp - ub_duckdb_common_allocator.cpp - duckdb_catalog_entries_dependency.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\catalog\catalog_entry\dependency\duckdb_catalog_entries_dependency.dir\Release\duckdb_catalog_entries_dependency.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/arrow/CMakeLists.txt - duckdb_common_allocator.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\allocator\duckdb_common_allocator.dir\Release\duckdb_common_allocator.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/arrow/appender/CMakeLists.txt - ub_duckdb_common_arrow.cpp - ub_duckdb_common_arrow_appender.cpp - duckdb_arrow_conversion.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\table\arrow\duckdb_arrow_conversion.dir\Release\duckdb_arrow_conversion.lib - duckdb_adbc_nanoarrow.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\adbc\nanoarrow\duckdb_adbc_nanoarrow.dir\Release\duckdb_adbc_nanoarrow.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/crypto/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/enums/CMakeLists.txt - duckdb_catalog_default_entries.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\catalog\default\duckdb_catalog_default_entries.dir\Release\duckdb_catalog_default_entries.lib - duckdb_common_arrow_appender.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\arrow\appender\duckdb_common_arrow_appender.dir\Release\duckdb_common_arrow_appender.lib - duckdb_adbc.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\adbc\duckdb_adbc.dir\Release\duckdb_adbc.lib - ub_duckdb_common_enums.cpp - ub_duckdb_common_crypto.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/exception/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/multi_file/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/main/http/CMakeLists.txt - duckdb_common_crypto.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\crypto\duckdb_common_crypto.dir\Release\duckdb_common_crypto.lib - duckdb_bind_tableref.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\planner\binder\tableref\duckdb_bind_tableref.dir\Release\duckdb_bind_tableref.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/operator/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/serializer/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/tree_renderer/CMakeLists.txt - ub_duckdb_common_exception.cpp - ub_duckdb_common_http.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/types/CMakeLists.txt - ub_duckdb_common_multi_file.cpp - duckdb_bind_expression.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\planner\binder\expression\duckdb_bind_expression.dir\Release\duckdb_bind_expression.lib - duckdb_common_arrow.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\arrow\duckdb_common_arrow.dir\Release\duckdb_common_arrow.lib - ub_duckdb_common_serializer.cpp - ub_duckdb_common_tree_renderer.cpp - ub_duckdb_common_operators.cpp - duckdb_common_enums.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\enums\duckdb_common_enums.dir\Release\duckdb_common_enums.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/types/column/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/types/row/CMakeLists.txt - duckdb_common_exception.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\exception\duckdb_common_exception.dir\Release\duckdb_common_exception.lib - duckdb_catalog.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\catalog\duckdb_catalog.dir\Release\duckdb_catalog.lib - ub_duckdb_common_types.cpp - duckdb_bind_query_node.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\planner\binder\query_node\duckdb_bind_query_node.dir\Release\duckdb_bind_query_node.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/util/CMakeLists.txt - duckdb_catalog_entries.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\catalog\catalog_entry\duckdb_catalog_entries.dir\Release\duckdb_catalog_entries.lib - ub_duckdb_common_types_column.cpp - ub_duckdb_common_types_row.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/types/variant/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/vector/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/parser/constraints/CMakeLists.txt - ub_duckdb_common_util.cpp - ub_duckdb_common_variant.cpp - duckdb_common_serializer.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\serializer\duckdb_common_serializer.dir\Release\duckdb_common_serializer.lib - duckdb_common_operators.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\operator\duckdb_common_operators.dir\Release\duckdb_common_operators.lib - duckdb_bind_statement.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\planner\binder\statement\duckdb_bind_statement.dir\Release\duckdb_bind_statement.lib - ub_duckdb_constraints.cpp - duckdb_aggr_distr.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\aggregate\distributive\duckdb_aggr_distr.dir\Release\duckdb_aggr_distr.lib - ub_duckdb_common_vector_types.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/operator/csv_scanner/scanner/CMakeLists.txt - duckdb_common.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\duckdb_common.dir\Release\duckdb_common.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/operator/csv_scanner/buffer_manager/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/operator/csv_scanner/encode/CMakeLists.txt - duckdb_common_tree_renderer.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\tree_renderer\duckdb_common_tree_renderer.dir\Release\duckdb_common_tree_renderer.lib - duckdb_common_util.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\util\duckdb_common_util.dir\Release\duckdb_common_util.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/operator/csv_scanner/state_machine/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/operator/csv_scanner/sniffer/CMakeLists.txt - duckdb_constraints.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\parser\constraints\duckdb_constraints.dir\Release\duckdb_constraints.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/operator/csv_scanner/util/CMakeLists.txt - ub_duckdb_csv_scanner.cpp - duckdb_common_variant.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\types\variant\duckdb_common_variant.dir\Release\duckdb_common_variant.lib - ub_duckdb_csv_buffer_manager.cpp - ub_duckdb_csv_encode.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/CMakeLists.txt - duckdb_common_http.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\main\http\duckdb_common_http.dir\Release\duckdb_common_http.lib - ub_duckdb_csv_state_machine.cpp - duckdb_common_multi_file.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\multi_file\duckdb_common_multi_file.dir\Release\duckdb_common_multi_file.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/index/art/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/parser/expression/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/planner/expression_binder/CMakeLists.txt - ub_duckdb_csv_sniffer.cpp - ub_duckdb_execution_index_art.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/index/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/storage/external_file_cache/CMakeLists.txt - ub_duckdb_expression.cpp - ub_duckdb_csv_util.cpp - ub_duckdb_external_file_cache.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/expression_executor/CMakeLists.txt - ub_duckdb_execution.cpp - ub_duckdb_expression_binders.cpp - ub_duckdb_execution_index.cpp - duckdb_common_types_row.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\types\row\duckdb_common_types_row.dir\Release\duckdb_common_types_row.lib - ub_duckdb_expression_executor.cpp - duckdb_common_types_column.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\types\column\duckdb_common_types_column.dir\Release\duckdb_common_types_column.lib - duckdb_common_vector_types.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\vector\duckdb_common_vector_types.dir\Release\duckdb_common_vector_types.lib - duckdb_csv_buffer_manager.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\operator\csv_scanner\buffer_manager\duckdb_csv_buffer_manager.dir\Release\duckdb_csv_buffer_manager.lib - duckdb_csv_encode.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\operator\csv_scanner\encode\duckdb_csv_encode.dir\Release\duckdb_csv_encode.lib - duckdb_csv_state_machine.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\operator\csv_scanner\state_machine\duckdb_csv_state_machine.dir\Release\duckdb_csv_state_machine.lib - duckdb_expression.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\parser\expression\duckdb_expression.dir\Release\duckdb_expression.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/cast/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/aggregate/CMakeLists.txt - duckdb_external_file_cache.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\storage\external_file_cache\duckdb_external_file_cache.dir\Release\duckdb_external_file_cache.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/scalar/comparison/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/scalar/compressed_materialization/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/scalar/date/CMakeLists.txt - ub_duckdb_func_aggr.cpp - ub_duckdb_func_cast.cpp - duckdb_execution_index_art.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\index\art\duckdb_execution_index_art.dir\Release\duckdb_execution_index_art.lib - duckdb_common_types.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\types\duckdb_common_types.dir\Release\duckdb_common_types.lib - ub_duckdb_func_comparison.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/scalar/generic/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/scalar/list/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/scalar/geometry/CMakeLists.txt - duckdb_csv_sniffer.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\operator\csv_scanner\sniffer\duckdb_csv_sniffer.dir\Release\duckdb_csv_sniffer.lib - ub_duckdb_func_date.cpp - ub_duckdb_func_compressed_materialization.cpp - duckdb_csv_scanner.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\operator\csv_scanner\scanner\duckdb_csv_scanner.dir\Release\duckdb_csv_scanner.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/scalar/operator/CMakeLists.txt - ub_duckdb_func_generic_main.cpp - ub_duckdb_func_list_nested.cpp - duckdb_csv_util.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\operator\csv_scanner\util\duckdb_csv_util.dir\Release\duckdb_csv_util.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/pragma/CMakeLists.txt - ub_duckdb_func_geometry.cpp - duckdb_execution_index.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\index\duckdb_execution_index.dir\Release\duckdb_execution_index.lib - ub_duckdb_func_ops_main.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/scalar/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/scalar/sequence/CMakeLists.txt - duckdb_execution.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\duckdb_execution.dir\Release\duckdb_execution.lib - duckdb_expression_binders.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\planner\expression_binder\duckdb_expression_binders.dir\Release\duckdb_expression_binders.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/scalar/string/CMakeLists.txt - ub_duckdb_func_pragma.cpp - duckdb_func_date.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\scalar\date\duckdb_func_date.dir\Release\duckdb_func_date.lib - ub_duckdb_func_scalar.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/scalar/string/regexp/CMakeLists.txt - ub_duckdb_func_seq.cpp - duckdb_func_geometry.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\scalar\geometry\duckdb_func_geometry.dir\Release\duckdb_func_geometry.lib - ub_duckdb_func_string_main.cpp - duckdb_func_generic_main.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\scalar\generic\duckdb_func_generic_main.dir\Release\duckdb_func_generic_main.lib - duckdb_func_compressed_materialization.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\scalar\compressed_materialization\duckdb_func_compressed_materialization.dir\Release\duckdb_func_compressed_materialization.lib - duckdb_func_aggr.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\aggregate\duckdb_func_aggr.dir\Release\duckdb_func_aggr.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/table/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/scalar/system/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/scalar/struct/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/table/version/CMakeLists.txt - ub_duckdb_func_string_regexp.cpp - duckdb_expression_executor.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\expression_executor\duckdb_expression_executor.dir\Release\duckdb_expression_executor.lib - ub_duckdb_func_system.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/scalar/variant/CMakeLists.txt - duckdb_func_list_nested.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\scalar\list\duckdb_func_list_nested.dir\Release\duckdb_func_list_nested.lib - ub_duckdb_func_table.cpp - duckdb_func_comparison.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\scalar\comparison\duckdb_func_comparison.dir\Release\duckdb_func_comparison.lib - ub_duckdb_func_table_version.cpp - ub_duckdb_func_struct_main.cpp - duckdb_func_seq.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\scalar\sequence\duckdb_func_seq.dir\Release\duckdb_func_seq.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/window/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/CMakeLists.txt - ub_duckdb_func_variant_main.cpp - ub_duckdb_func_window.cpp - duckdb_func_pragma.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\pragma\duckdb_func_pragma.dir\Release\duckdb_func_pragma.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/scalar/map/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/variant/CMakeLists.txt - ub_duckdb_function.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/logging/CMakeLists.txt - ub_duckdb_function_variant.cpp - ub_duckdb_logging.cpp - ub_duckdb_function_map.cpp - duckdb_func_scalar.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\scalar\duckdb_func_scalar.dir\Release\duckdb_func_scalar.lib - duckdb_func_string_regexp.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\scalar\string\regexp\duckdb_func_string_regexp.dir\Release\duckdb_func_string_regexp.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/main/CMakeLists.txt - duckdb_function_variant.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\variant\duckdb_function_variant.dir\Release\duckdb_function_variant.lib - ub_duckdb_main.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/main/buffered_data/CMakeLists.txt - duckdb_function_map.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\scalar\map\duckdb_function_map.dir\Release\duckdb_function_map.lib - duckdb_func_table_version.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\table\version\duckdb_func_table_version.dir\Release\duckdb_func_table_version.lib - ub_duckdb_main_buffered_data.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/main/capi/cast/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/main/capi/CMakeLists.txt - duckdb_func_string_main.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\scalar\string\duckdb_func_string_main.dir\Release\duckdb_func_string_main.lib - duckdb_func_variant_main.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\scalar\variant\duckdb_func_variant_main.dir\Release\duckdb_func_variant_main.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/main/chunk_scan_state/CMakeLists.txt - ub_duckdb_main_capi_cast.cpp - ub_duckdb_main_capi.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/main/extension/CMakeLists.txt - duckdb_func_ops_main.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\scalar\operator\duckdb_func_ops_main.dir\Release\duckdb_func_ops_main.lib - duckdb_func_struct_main.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\scalar\struct\duckdb_func_struct_main.dir\Release\duckdb_func_struct_main.lib - ub_duckdb_main_chunk_scan_state.cpp - duckdb_func_window.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\window\duckdb_func_window.dir\Release\duckdb_func_window.lib - duckdb_logging.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\logging\duckdb_logging.dir\Release\duckdb_logging.lib - duckdb_func_system.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\scalar\system\duckdb_func_system.dir\Release\duckdb_func_system.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/main/relation/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/main/profiler/CMakeLists.txt - extension_alias.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/main/settings/CMakeLists.txt - duckdb_main_chunk_scan_state.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\main\chunk_scan_state\duckdb_main_chunk_scan_state.dir\Release\duckdb_main_chunk_scan_state.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/main/secret/CMakeLists.txt - duckdb_main_buffered_data.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\main\buffered_data\duckdb_main_buffered_data.dir\Release\duckdb_main_buffered_data.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/nested_loop_join/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/operator/aggregate/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/operator/csv_scanner/table_function/CMakeLists.txt - ub_duckdb_main_settings.cpp - ub_duckdb_main_profiler.cpp - ub_duckdb_main_relation.cpp - ub_duckdb_operator_aggregate.cpp - duckdb_main_capi_cast.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\main\capi\cast\duckdb_main_capi_cast.dir\Release\duckdb_main_capi_cast.lib - ub_duckdb_main_secret.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/operator/helper/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/operator/filter/CMakeLists.txt - duckdb_function.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\duckdb_function.dir\Release\duckdb_function.lib - ub_duckdb_nested_loop_join.cpp - ub_duckdb_operator_csv_table_function.cpp - duckdb_func_cast.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\cast\duckdb_func_cast.dir\Release\duckdb_func_cast.lib - ub_duckdb_operator_helper.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/operator/join/CMakeLists.txt - ub_duckdb_operator_join.cpp - ub_duckdb_operator_filter.cpp - extension_helper.cpp - duckdb_nested_loop_join.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\nested_loop_join\duckdb_nested_loop_join.dir\Release\duckdb_nested_loop_join.lib - duckdb_main_profiler.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\main\profiler\duckdb_main_profiler.dir\Release\duckdb_main_profiler.lib - duckdb_func_table.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\table\duckdb_func_table.dir\Release\duckdb_func_table.lib - duckdb_main_capi.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\main\capi\duckdb_main_capi.dir\Release\duckdb_main_capi.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/operator/persistent/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/operator/order/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/operator/projection/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/operator/scan/CMakeLists.txt - duckdb_operator_filter.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\operator\filter\duckdb_operator_filter.dir\Release\duckdb_operator_filter.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/operator/schema/CMakeLists.txt - ub_duckdb_operator_persistent.cpp - ub_duckdb_operator_order.cpp - ub_duckdb_operator_scan.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/operator/set/CMakeLists.txt - ub_duckdb_operator_schema.cpp - ub_duckdb_operator_projection.cpp - ub_duckdb_operator_set.cpp - duckdb_main_settings.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\main\settings\duckdb_main_settings.dir\Release\duckdb_main_settings.lib - extension_install.cpp - duckdb_operator_order.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\operator\order\duckdb_operator_order.dir\Release\duckdb_operator_order.lib - duckdb_operator_projection.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\operator\projection\duckdb_operator_projection.dir\Release\duckdb_operator_projection.lib - duckdb_main_secret.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\main\secret\duckdb_main_secret.dir\Release\duckdb_main_secret.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/optimizer/compressed_materialization/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/optimizer/matcher/CMakeLists.txt - duckdb_main_relation.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\main\relation\duckdb_main_relation.dir\Release\duckdb_main_relation.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/optimizer/join_order/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/optimizer/pushdown/CMakeLists.txt - duckdb_operator_csv_table_function.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\operator\csv_scanner\table_function\duckdb_operator_csv_table_function.dir\Release\duckdb_operator_csv_table_function.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/optimizer/pullup/CMakeLists.txt - ub_duckdb_optimizer_compressed_materialization.cpp - duckdb_operator_aggregate.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\operator\aggregate\duckdb_operator_aggregate.dir\Release\duckdb_operator_aggregate.lib - ub_duckdb_optimizer_matcher.cpp - ub_duckdb_optimizer_pushdown.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/optimizer/CMakeLists.txt - duckdb_operator_helper.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\operator\helper\duckdb_operator_helper.dir\Release\duckdb_operator_helper.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/optimizer/relation_statistics/CMakeLists.txt - ub_duckdb_optimizer_join_order.cpp - ub_duckdb_optimizer_pullup.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/optimizer/rule/CMakeLists.txt - duckdb_operator_set.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\operator\set\duckdb_operator_set.dir\Release\duckdb_operator_set.lib - ub_duckdb_optimizer_rules.cpp - ub_duckdb_optimizer_relation_statistics.cpp - duckdb_operator_join.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\operator\join\duckdb_operator_join.dir\Release\duckdb_operator_join.lib - ub_duckdb_optimizer.cpp - duckdb_operator_scan.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\operator\scan\duckdb_operator_scan.dir\Release\duckdb_operator_scan.lib - duckdb_operator_schema.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\operator\schema\duckdb_operator_schema.dir\Release\duckdb_operator_schema.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/optimizer/statistics/operator/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/optimizer/statistics/expression/CMakeLists.txt - duckdb_optimizer_pullup.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\optimizer\pullup\duckdb_optimizer_pullup.dir\Release\duckdb_optimizer_pullup.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/parallel/CMakeLists.txt - duckdb_optimizer_matcher.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\optimizer\matcher\duckdb_optimizer_matcher.dir\Release\duckdb_optimizer_matcher.lib - extension_load.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/parser/parsed_data/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/parser/CMakeLists.txt - duckdb_optimizer_compressed_materialization.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\optimizer\compressed_materialization\duckdb_optimizer_compressed_materialization.dir\Release\duckdb_optimizer_compressed_materialization.lib - ub_duckdb_optimizer_statistics_op.cpp - ub_duckdb_optimizer_statistics_expr.cpp - ub_duckdb_parallel.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/parser/peg/CMakeLists.txt - duckdb_optimizer_pushdown.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\optimizer\pushdown\duckdb_optimizer_pushdown.dir\Release\duckdb_optimizer_pushdown.lib - ub_duckdb_parsed_data.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/parser/peg/tokenizer/CMakeLists.txt - ub_duckdb_parser.cpp - duckdb_optimizer_rules.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\optimizer\rule\duckdb_optimizer_rules.dir\Release\duckdb_optimizer_rules.lib - ub_duckdb_parser_peg_tokenizer.cpp - ub_duckdb_parser_peg.cpp - duckdb_optimizer_statistics_expr.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\optimizer\statistics\expression\duckdb_optimizer_statistics_expr.dir\Release\duckdb_optimizer_statistics_expr.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/parser/peg/transformer/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/parser/tableref/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/physical_plan/CMakeLists.txt - duckdb_optimizer_relation_statistics.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\optimizer\relation_statistics\duckdb_optimizer_relation_statistics.dir\Release\duckdb_optimizer_relation_statistics.lib - ub_duckdb_parser_peg_transformer.cpp - duckdb_optimizer_join_order.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\optimizer\join_order\duckdb_optimizer_join_order.dir\Release\duckdb_optimizer_join_order.lib - extension_loader.cpp - ub_duckdb_physical_plan.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/planner/CMakeLists.txt - duckdb_operator_persistent.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\operator\persistent\duckdb_operator_persistent.dir\Release\duckdb_operator_persistent.lib - duckdb_parser_peg_tokenizer.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\parser\peg\tokenizer\duckdb_parser_peg_tokenizer.dir\Release\duckdb_parser_peg_tokenizer.lib - duckdb_optimizer_statistics_op.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\optimizer\statistics\operator\duckdb_optimizer_statistics_op.dir\Release\duckdb_optimizer_statistics_op.lib - ub_duckdb_parser_tableref.cpp - ub_duckdb_planner.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/planner/expression/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/planner/operator/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/planner/filter/CMakeLists.txt - ub_duckdb_planner_expression.cpp - ub_duckdb_planner_operator.cpp - ub_duckdb_planner_filter.cpp - duckdb_parser.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\parser\duckdb_parser.dir\Release\duckdb_parser.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/planner/subquery/CMakeLists.txt - ub_duckdb_planner_subquery.cpp - duckdb_parsed_data.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\parser\parsed_data\duckdb_parsed_data.dir\Release\duckdb_parsed_data.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/progress_bar/CMakeLists.txt - ub_duckdb_progress_bar.cpp - duckdb_planner_expression.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\planner\expression\duckdb_planner_expression.dir\Release\duckdb_planner_expression.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/parser/query_node/CMakeLists.txt - ub_duckdb_query_node.cpp - duckdb_parser_peg.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\parser\peg\duckdb_parser_peg.dir\Release\duckdb_parser_peg.lib - duckdb_parser_tableref.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\parser\tableref\duckdb_parser_tableref.dir\Release\duckdb_parser_tableref.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/execution/sample/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/row_operations/CMakeLists.txt - ub_duckdb_sample.cpp - ub_duckdb_row_operations.cpp - duckdb_planner_filter.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\planner\filter\duckdb_planner_filter.dir\Release\duckdb_planner_filter.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/sort/CMakeLists.txt - ub_duckdb_sort.cpp - duckdb_progress_bar.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\progress_bar\duckdb_progress_bar.dir\Release\duckdb_progress_bar.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/parser/statement/CMakeLists.txt - ub_duckdb_statement.cpp - duckdb_query_node.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\parser\query_node\duckdb_query_node.dir\Release\duckdb_query_node.lib - duckdb_sample.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\sample\duckdb_sample.dir\Release\duckdb_sample.lib - Generating Code... - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/storage/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/storage/buffer/CMakeLists.txt - ub_duckdb_storage.cpp - duckdb_planner_operator.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\planner\operator\duckdb_planner_operator.dir\Release\duckdb_planner_operator.lib - ub_duckdb_storage_buffer.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/storage/checkpoint/CMakeLists.txt - ub_duckdb_storage_checkpoint.cpp - duckdb_parallel.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\parallel\duckdb_parallel.dir\Release\duckdb_parallel.lib - duckdb_main.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\main\duckdb_main.dir\Release\duckdb_main.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/storage/compression/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/storage/compression/alp/CMakeLists.txt - ub_duckdb_storage_compression.cpp - ub_duckdb_storage_compression_alp.cpp - duckdb_storage_buffer.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\storage\buffer\duckdb_storage_buffer.dir\Release\duckdb_storage_buffer.lib - duckdb_main_extension.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\main\extension\duckdb_main_extension.dir\Release\duckdb_main_extension.lib - duckdb_statement.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\parser\statement\duckdb_statement.dir\Release\duckdb_statement.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/storage/compression/dict_fsst/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/storage/compression/chimp/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/storage/compression/dictionary/CMakeLists.txt -C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\include\algorithm(7791,39): warning C4018: '<=': signed/unsigned mismatch [C:\Work\GH\repos\duckdb-documentdb\build\src\common\sort\duckdb_sort.vcxproj] - (compiling source file 'ub_duckdb_sort.cpp') - C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\include\algorithm(7791,39): - the template instantiation context (the oldest one first) is - C:\Work\GH\repos\duckdb-documentdb\duckdb\src\common\sort\sorted_run.cpp(264,3): - see reference to function template instantiation 'void duckdb::TemplatedSort(duckdb::ClientContext &,duckdb::TupleDataCollection &,const bool)' being compiled - C:\Work\GH\repos\duckdb-documentdb\duckdb\src\common\sort\sorted_run.cpp(253,20): - see reference to function template instantiation 'void duckdb_vergesort::vergesort,duckdb::TemplatedSort::>(BidirectionalIterator,BidirectionalIterator,Compare,Fallback)' being compiled - with - [ - BidirectionalIterator=duckdb::TemplatedSort::BLOCK_ITERATOR, - Compare=std::less, - Fallback=duckdb::TemplatedSort:: - ] - C:\Work\GH\repos\duckdb-documentdb\duckdb\third_party\vergesort\vergesort.h(339,17): - see reference to function template instantiation 'void duckdb_vergesort::detail::vergesort(RandomAccessIterator,RandomAccessIterator,Compare,std::random_access_iterator_tag,Fallback)' being compiled - with - [ - BidirectionalIterator=duckdb::TemplatedSort::BLOCK_ITERATOR, - Compare=std::less, - Fallback=duckdb::TemplatedSort::, - RandomAccessIterator=duckdb::TemplatedSort::BLOCK_ITERATOR - ] - C:\Work\GH\repos\duckdb-documentdb\duckdb\third_party\vergesort\vergesort.h(324,26): - see reference to function template instantiation 'void std::inplace_merge(_BidIt,_BidIt,_BidIt,_Pr)' being compiled - with - [ - RandomAccessIterator=duckdb::TemplatedSort::BLOCK_ITERATOR, - Compare=std::less, - _BidIt=duckdb::TemplatedSort::BLOCK_ITERATOR, - _Pr=std::less - ] - C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\include\algorithm(7892,10): - see reference to function template instantiation 'void std::_Buffered_inplace_merge_unchecked_impl<_BidIt,_Fn>(_BidIt,_BidIt,_BidIt,unsigned __int64,unsigned __int64,duckdb::SortKey *const ,const ptrdiff_t,_Pr)' being compiled - with - [ - _BidIt=duckdb::TemplatedSort::BLOCK_ITERATOR, - _Fn=std::less, - _Pr=std::less - ] - -C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\include\algorithm(7793,24): warning C4018: '<=': signed/unsigned mismatch [C:\Work\GH\repos\duckdb-documentdb\build\src\common\sort\duckdb_sort.vcxproj] - (compiling source file 'ub_duckdb_sort.cpp') - - ub_duckdb_storage_compression_dict_fsst.cpp - ub_duckdb_storage_compression_chimp.cpp - ub_duckdb_storage_compression_dictionary.cpp - duckdb_physical_plan.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\execution\physical_plan\duckdb_physical_plan.dir\Release\duckdb_physical_plan.lib -C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\include\algorithm(6425,39): warning C4018: '<=': signed/unsigned mismatch [C:\Work\GH\repos\duckdb-documentdb\build\src\common\sort\duckdb_sort.vcxproj] - (compiling source file 'ub_duckdb_sort.cpp') - C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\include\algorithm(6425,39): - the template instantiation context (the oldest one first) is - C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\include\algorithm(7892,10): - see reference to function template instantiation 'void std::_Buffered_inplace_merge_unchecked_impl<_BidIt,_Fn>(_BidIt,_BidIt,_BidIt,unsigned __int64,unsigned __int64,duckdb::SortKey *const ,const ptrdiff_t,_Pr)' being compiled - with - [ - _BidIt=duckdb::TemplatedSort::BLOCK_ITERATOR, - _Fn=std::less, - _Pr=std::less - ] - C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\include\algorithm(7796,14): - see reference to function template instantiation 'void std::_Buffered_inplace_merge_divide_and_conquer<_BidIt,_Pr>(_BidIt,_BidIt,_BidIt,unsigned __int64,unsigned __int64,duckdb::SortKey *const ,const ptrdiff_t,_Pr)' being compiled - with - [ - _BidIt=duckdb::TemplatedSort::BLOCK_ITERATOR, - _Pr=std::less - ] - C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\include\algorithm(7775,14): - see reference to function template instantiation 'void std::_Buffered_inplace_merge_divide_and_conquer2<_BidIt,_Pr>(_BidIt,_BidIt,_BidIt,unsigned __int64,unsigned __int64,duckdb::SortKey *const ,const ptrdiff_t,_Pr,_BidIt,_BidIt,unsigned __int64,unsigned __int64)' being compiled - with - [ - _BidIt=duckdb::TemplatedSort::BLOCK_ITERATOR, - _Pr=std::less - ] - C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\include\algorithm(7757,25): - see reference to function template instantiation '_BidIt std::_Buffered_rotate_unchecked<_BidIt>(const _BidIt,const _BidIt,const _BidIt,const unsigned __int64,const unsigned __int64,duckdb::SortKey *const ,const ptrdiff_t)' being compiled - with - [ - _BidIt=duckdb::TemplatedSort::BLOCK_ITERATOR - ] - -C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\include\algorithm(6433,17): warning C4018: '<=': signed/unsigned mismatch [C:\Work\GH\repos\duckdb-documentdb\build\src\common\sort\duckdb_sort.vcxproj] - (compiling source file 'ub_duckdb_sort.cpp') - - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/storage/compression/roaring/CMakeLists.txt - ub_duckdb_storage_compression_roaring.cpp - duckdb_planner_subquery.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\planner\subquery\duckdb_planner_subquery.dir\Release\duckdb_planner_subquery.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/storage/metadata/CMakeLists.txt - duckdb_storage_compression_chimp.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\storage\compression\chimp\duckdb_storage_compression_chimp.dir\Release\duckdb_storage_compression_chimp.lib -C:\Work\GH\repos\duckdb-documentdb\duckdb\src\include\duckdb\storage\compression\roaring\roaring.hpp(667,62): warning C4805: '&': unsafe mix of type 'bool' and type 'int' in operation [C:\Work\GH\repos\duckdb-documentdb\build\src\storage\compression\roaring\duckdb_storage_compression_roaring.vcxproj] - (compiling source file 'ub_duckdb_storage_compression_roaring.cpp') - C:\Work\GH\repos\duckdb-documentdb\duckdb\src\include\duckdb\storage\compression\roaring\roaring.hpp(667,62): - the template instantiation context (the oldest one first) is - C:\Work\GH\repos\duckdb-documentdb\duckdb\src\storage\compression\roaring\analyze.cpp(180,3): - see reference to function template instantiation 'void duckdb::roaring::BitPackBooleans(duckdb::data_ptr_t,const bool *,const duckdb::idx_t,const duckdb::ValidityMask *,duckdb::StatsWriter *)' being compiled - -C:\Work\GH\repos\duckdb-documentdb\duckdb\src\include\duckdb\common\limits.hpp(27,49): warning C4804: '-': unsafe use of type 'bool' in operation [C:\Work\GH\repos\duckdb-documentdb\build\src\storage\compression\roaring\duckdb_storage_compression_roaring.vcxproj] - (compiling source file 'ub_duckdb_storage_compression_roaring.cpp') - C:\Work\GH\repos\duckdb-documentdb\duckdb\src\include\duckdb\common\limits.hpp(27,49): - the template instantiation context (the oldest one first) is - C:\Work\GH\repos\duckdb-documentdb\duckdb\src\include\duckdb\storage\compression\roaring\roaring.hpp(379,20): - see reference to class template instantiation 'duckdb::StatsWriter' being compiled - C:\Work\GH\repos\duckdb-documentdb\duckdb\src\include\duckdb\storage\statistics\stats_writer.hpp(62,14): - while compiling class template member function 'void duckdb::StatsWriter::Clear(void)' - C:\Work\GH\repos\duckdb-documentdb\duckdb\src\include\duckdb\storage\compression\standard_compression_state.hpp(32,21): - see the first reference to 'duckdb::StatsWriter::Clear' in 'duckdb::StandardCompressionState::FlushCurrentSegment' - C:\Work\GH\repos\duckdb-documentdb\duckdb\src\include\duckdb\storage\statistics\stats_writer.hpp(64,27): - see reference to class template instantiation 'duckdb::NumericLimits' being compiled - with - [ - T=bool - ] - C:\Work\GH\repos\duckdb-documentdb\duckdb\src\include\duckdb\common\limits.hpp(26,21): - while compiling class template member function 'T duckdb::NumericLimits::Minimum(void)' - with - [ - T=bool - ] - C:\Work\GH\repos\duckdb-documentdb\duckdb\src\include\duckdb\storage\statistics\stats_writer.hpp(65,7): - see the first reference to 'duckdb::NumericLimits::Minimum' in 'duckdb::StatsWriter::Clear' - with - [ - T=bool - ] - C:\Work\GH\repos\duckdb-documentdb\duckdb\src\include\duckdb\storage\compression\standard_compression_state.hpp(32,21): - see the first reference to 'duckdb::StatsWriter::Clear' in 'duckdb::StandardCompressionState::FlushCurrentSegment' - - ub_duckdb_storage_metadata.cpp - duckdb_storage_compression_dictionary.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\storage\compression\dictionary\duckdb_storage_compression_dictionary.dir\Release\duckdb_storage_compression_dictionary.lib - duckdb_storage_compression_dict_fsst.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\storage\compression\dict_fsst\duckdb_storage_compression_dict_fsst.dir\Release\duckdb_storage_compression_dict_fsst.lib - duckdb_storage_checkpoint.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\storage\checkpoint\duckdb_storage_checkpoint.dir\Release\duckdb_storage_checkpoint.lib - duckdb_row_operations.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\row_operations\duckdb_row_operations.dir\Release\duckdb_row_operations.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/storage/serialization/CMakeLists.txt - duckdb_storage_compression_alp.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\storage\compression\alp\duckdb_storage_compression_alp.dir\Release\duckdb_storage_compression_alp.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/storage/statistics/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/transaction/CMakeLists.txt - duckdb_storage_compression_roaring.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\storage\compression\roaring\duckdb_storage_compression_roaring.dir\Release\duckdb_storage_compression_roaring.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/storage/table/variant/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/storage/table/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/table/system/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/cast/union/CMakeLists.txt - ub_duckdb_transaction.cpp - ub_duckdb_storage_serialization.cpp - ub_duckdb_storage_statistics.cpp - duckdb_storage_metadata.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\storage\metadata\duckdb_storage_metadata.dir\Release\duckdb_storage_metadata.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/value_operations/CMakeLists.txt - ub_duckdb_storage_table_variant.cpp - ub_duckdb_storage_table.cpp - ub_duckdb_table_func_system.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/function/cast/variant/CMakeLists.txt - ub_duckdb_union_cast.cpp - duckdb_planner.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\planner\duckdb_planner.dir\Release\duckdb_planner.lib - duckdb_storage_compression.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\storage\compression\duckdb_storage_compression.dir\Release\duckdb_storage_compression.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/common/vector_operations/CMakeLists.txt - duckdb_optimizer.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\optimizer\duckdb_optimizer.dir\Release\duckdb_optimizer.lib - ub_duckdb_value_operations.cpp - ub_duckdb_variant_cast.cpp - duckdb_union_cast.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\cast\union\duckdb_union_cast.dir\Release\duckdb_union_cast.lib - boolean_operators.cpp - duckdb_storage.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\storage\duckdb_storage.dir\Release\duckdb_storage.lib - duckdb_storage_table_variant.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\storage\table\variant\duckdb_storage_table_variant.dir\Release\duckdb_storage_table_variant.lib - duckdb_transaction.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\transaction\duckdb_transaction.dir\Release\duckdb_transaction.lib - duckdb_storage_statistics.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\storage\statistics\duckdb_storage_statistics.dir\Release\duckdb_storage_statistics.lib - duckdb_value_operations.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\value_operations\duckdb_value_operations.dir\Release\duckdb_value_operations.lib - vector_cast.cpp - comparison_operators.cpp - duckdb_sort.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\sort\duckdb_sort.dir\Release\duckdb_sort.lib - duckdb_variant_cast.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\cast\variant\duckdb_variant_cast.dir\Release\duckdb_variant_cast.lib - vector_copy.cpp - generators.cpp - vector_hash.cpp - vector_storage.cpp - null_operations.cpp - duckdb_storage_serialization.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\storage\serialization\duckdb_storage_serialization.dir\Release\duckdb_storage_serialization.lib - duckdb_storage_table.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\storage\table\duckdb_storage_table.dir\Release\duckdb_storage_table.lib - numeric_inplace_operators.cpp - duckdb_table_func_system.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\function\table\system\duckdb_table_func_system.dir\Release\duckdb_table_func_system.lib - is_distinct_from.cpp - Generating Code... - duckdb_parser_peg_transformer.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\parser\peg\transformer\duckdb_parser_peg_transformer.dir\Release\duckdb_parser_peg_transformer.lib - duckdb_vector_operations.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\common\vector_operations\duckdb_vector_operations.dir\Release\duckdb_vector_operations.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/third_party/fsst/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/third_party/miniz/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/third_party/skiplist/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/third_party/hyperloglog/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/third_party/mbedtls/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/aggregate/algebraic/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/third_party/fmt/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/third_party/re2/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/scalar/array/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/third_party/fastpforlib/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/third_party/utf8proc/CMakeLists.txt - miniz.cpp - libfsst.cpp - ub_duckdb_core_functions_algebraic.cpp - generated_extension_loader.cpp - mbedtls_wrapper.cpp - SkipList.cpp - bitpacking.cpp - format.cc - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/third_party/zstd/CMakeLists.txt - bitmap256.cc - hyperloglog.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/third_party/yyjson/CMakeLists.txt - utf8proc.cpp - ub_duckdb_core_functions_array.cpp - utf8proc_wrapper.cpp - compile.cc - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/scalar/bit/CMakeLists.txt - sds.cpp - Generating Code... - duckdb_skiplistlib.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\third_party\skiplist\Release\duckdb_skiplistlib.lib - bitstate.cc - zstd_compress_superblock.cpp - yyjson.cpp - zstdmt_compress.cpp - duckdb_fsst.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\third_party\fsst\Release\duckdb_fsst.lib - Generating Code... - aes.cpp - zstd_double_fast.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/scalar/blob/CMakeLists.txt - asn1parse.cpp - zstd_fast.cpp - asn1write.cpp - dfa.cc - duckdb_hyperloglog.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\third_party\hyperloglog\Release\duckdb_hyperloglog.lib - base64.cpp - zstd_compress_sequences.cpp - bignum.cpp - ub_duckdb_core_functions_bit.cpp - bignum_core.cpp - zstd_ldm.cpp - cipher.cpp - duckdb_miniz.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\third_party\miniz\Release\duckdb_miniz.lib - hist.cpp - cipher_wrap.cpp - constant_time.cpp - zstd_compress.cpp - gcm.cpp - md.cpp - oid.cpp - zstd_lazy.cpp - pem.cpp - pk.cpp - zstd_compress_literals.cpp - pk_wrap.cpp - pkparse.cpp - duckdb_utf8proc.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\third_party\utf8proc\Release\duckdb_utf8proc.lib - huf_compress.cpp - platform.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/scalar/date/CMakeLists.txt - zstd_opt.cpp - platform_util.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/aggregate/distributive/CMakeLists.txt - fse_compress.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/scalar/enum/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/scalar/debug/CMakeLists.txt - filtered_re2.cc - zstd_ddict.cpp - ub_duckdb_core_functions_blob.cpp - huf_decompress.cpp - rsa.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/scalar/generic/CMakeLists.txt - Generating Code... - zstd_decompress.cpp - duckdb_core_functions_array.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\scalar\array\duckdb_core_functions_array.dir\Release\duckdb_core_functions_array.lib - zstd_decompress_block.cpp - entropy_common.cpp - fse_decompress.cpp - debug.cpp - Generating Code... - duckdb_fmt.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\third_party\fmt\Release\duckdb_fmt.lib - mimics_pcre.cc - ub_duckdb_core_functions_distributive.cpp - duckdb_core_functions_algebraic.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\aggregate\algebraic\duckdb_core_functions_algebraic.dir\Release\duckdb_core_functions_algebraic.lib - ub_duckdb_core_functions_enum.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/aggregate/holistic/CMakeLists.txt - ub_duckdb_core_functions_generic.cpp - duckdb_core_functions_bit.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\scalar\bit\duckdb_core_functions_bit.dir\Release\duckdb_core_functions_bit.lib - Compiling... - rsa_alt_helpers.cpp - sha1.cpp - ub_duckdb_core_functions_debug.cpp - sha256.cpp - nfa.cc - ub_duckdb_core_functions_date.cpp - Generating Code... -C:\Work\GH\repos\duckdb-documentdb\build\codegen\src\generated_extension_loader.cpp(10,32): error C2065: 'DocumentdbExtension': undeclared identifier [C:\Work\GH\repos\duckdb-documentdb\build\extension\duckdb_generated_extension_loader.vcxproj] -C:\Work\GH\repos\duckdb-documentdb\build\codegen\src\generated_extension_loader.cpp(10,12): error C2672: 'duckdb::DuckDB::LoadStaticExtension': no matching overloaded function found [C:\Work\GH\repos\duckdb-documentdb\build\extension\duckdb_generated_extension_loader.vcxproj] - C:\Work\GH\repos\duckdb-documentdb\duckdb\src\include\duckdb\main\database.hpp(135,7): - could be 'void duckdb::DuckDB::LoadStaticExtension(void)' - C:\Work\GH\repos\duckdb-documentdb\build\codegen\src\generated_extension_loader.cpp(10,32): - 'duckdb::DuckDB::LoadStaticExtension': invalid template argument for 'T', type expected - - duckdb_core_functions_blob.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\scalar\blob\duckdb_core_functions_blob.dir\Release\duckdb_core_functions_blob.lib - ub_duckdb_core_functions_holistic.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/scalar/list/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/scalar/map/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/scalar/math/CMakeLists.txt - onepass.cc - duckdb_mbedtls.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\third_party\mbedtls\Release\duckdb_mbedtls.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/aggregate/nested/CMakeLists.txt - ub_duckdb_core_functions_math.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/scalar/operators/CMakeLists.txt - parse.cc - ub_duckdb_core_functions_map.cpp - ub_duckdb_core_functions_nested.cpp - ub_duckdb_core_functions_list.cpp - perl_groups.cc - prefilter.cc - ub_duckdb_core_functions_operators.cpp - duckdb_core_functions_enum.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\scalar\enum\duckdb_core_functions_enum.dir\Release\duckdb_core_functions_enum.lib - duckdb_fastpforlib.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\third_party\fastpforlib\Release\duckdb_fastpforlib.lib - prefilter_tree.cc - duckdb_core_functions_debug.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\scalar\debug\duckdb_core_functions_debug.dir\Release\duckdb_core_functions_debug.lib - prog.cc - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/scalar/random/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/aggregate/regression/CMakeLists.txt - re2.cc - duckdb_core_functions_generic.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\scalar\generic\duckdb_core_functions_generic.dir\Release\duckdb_core_functions_generic.lib - duckdb_core_functions_map.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\scalar\map\duckdb_core_functions_map.dir\Release\duckdb_core_functions_map.lib - ub_duckdb_core_functions_random.cpp - Compiling... - xxhash.cpp - regexp.cc - pool.cpp - threading.cpp - zstd_common.cpp - error_private.cpp - cover.cpp - divsufsort.cpp - fastcover.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/scalar/struct/CMakeLists.txt - zdict.cpp - zbuff_common.cpp - zbuff_decompress.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/scalar/string/CMakeLists.txt - zbuff_compress.cpp - ub_duckdb_core_functions_regression.cpp - Generating Code... - duckdb_core_functions_operators.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\scalar\operators\duckdb_core_functions_operators.dir\Release\duckdb_core_functions_operators.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/scalar/union/CMakeLists.txt - ub_duckdb_core_functions_struct.cpp - ub_duckdb_core_functions_string.cpp - ub_duckdb_core_functions_union.cpp - set.cc - duckdb_core_functions_list.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\scalar\list\duckdb_core_functions_list.dir\Release\duckdb_core_functions_list.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/parquet/decoder/CMakeLists.txt - duckdb_zstd.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\third_party\zstd\Release\duckdb_zstd.lib - duckdb_core_functions_random.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\scalar\random\duckdb_core_functions_random.dir\Release\duckdb_core_functions_random.lib - ub_duckdb_parquet_decoders.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/parquet/reader/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/parquet/reader/variant/CMakeLists.txt - ub_duckdb_parquet_readers.cpp - ub_duckdb_parquet_reader_variant.cpp - duckdb_core_functions_regression.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\aggregate\regression\duckdb_core_functions_regression.dir\Release\duckdb_core_functions_regression.lib - duckdb_core_functions_struct.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\scalar\struct\duckdb_core_functions_struct.dir\Release\duckdb_core_functions_struct.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/parquet/writer/variant/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/parquet/writer/CMakeLists.txt - ub_duckdb_parquet_writer_variant.cpp - ub_duckdb_parquet_writers.cpp - simplify.cc - duckdb_core_functions_union.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\scalar\union\duckdb_core_functions_union.dir\Release\duckdb_core_functions_union.lib - duckdb_core_functions_math.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\scalar\math\duckdb_core_functions_math.dir\Release\duckdb_core_functions_math.lib - stringpiece.cc -C:\Work\GH\repos\duckdb-documentdb\duckdb\extension\core_functions\scalar\date\date_part.cpp(2014,1): warning C4715: 'duckdb::`anonymous namespace'::DatePartUnaryStatistics': not all control paths return a value [C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\scalar\date\duckdb_core_functions_date.vcxproj] - tostring.cc - duckdb_parquet_decoders.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\parquet\decoder\duckdb_parquet_decoders.dir\Release\duckdb_parquet_decoders.lib - duckdb_parquet_readers.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\parquet\reader\duckdb_parquet_readers.dir\Release\duckdb_parquet_readers.lib - unicode_casefold.cc - Generating Code... - duckdb_core_functions_distributive.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\aggregate\distributive\duckdb_core_functions_distributive.dir\Release\duckdb_core_functions_distributive.lib - duckdb_core_functions_holistic.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\aggregate\holistic\duckdb_core_functions_holistic.dir\Release\duckdb_core_functions_holistic.lib -C:\Work\GH\repos\duckdb-documentdb\duckdb\extension\core_functions\scalar\date\date_part.cpp(1935,1): warning C4715: 'duckdb::`anonymous namespace'::DatePartUnaryCallback': not all control paths return a value [C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\scalar\date\duckdb_core_functions_date.vcxproj] - duckdb_yyjson.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\third_party\yyjson\Release\duckdb_yyjson.lib - duckdb_core_functions_string.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\scalar\string\duckdb_core_functions_string.dir\Release\duckdb_core_functions_string.lib - duckdb_core_functions_date.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\scalar\date\duckdb_core_functions_date.dir\Release\duckdb_core_functions_date.lib - duckdb_parquet_writer_variant.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\parquet\writer\variant\duckdb_parquet_writer_variant.dir\Release\duckdb_parquet_writer_variant.lib - duckdb_core_functions_nested.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\aggregate\nested\duckdb_core_functions_nested.dir\Release\duckdb_core_functions_nested.lib - duckdb_parquet_writers.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\parquet\writer\duckdb_parquet_writers.dir\Release\duckdb_parquet_writers.lib - duckdb_parquet_reader_variant.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\parquet\reader\variant\duckdb_parquet_reader_variant.dir\Release\duckdb_parquet_reader_variant.lib - Compiling... - unicode_groups.cc - rune.cc - strutil.cc - Generating Code... - duckdb_re2.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\third_party\re2\Release\duckdb_re2.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/src/CMakeLists.txt - duckdb_static.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\src\Release\duckdb_static.lib - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/parquet/CMakeLists.txt - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/CMakeLists.txt - documentdb_extension.cpp - column_reader.cpp - Building Custom Rule C:/Work/GH/repos/duckdb-documentdb/duckdb/extension/core_functions/CMakeLists.txt - core_functions_extension.cpp - documentdb_connection.cpp - documentdb_schema.cpp - function_list.cpp - documentdb_scan.cpp - Generating Code... - documentdb_extension.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\documentdb\Release\documentdb_extension.lib - column_writer.cpp - lambda_functions.cpp - Generating Code... - core_functions_extension.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\core_functions\Release\core_functions_extension.lib - parquet_crypto.cpp - parquet_file_metadata_cache.cpp - parquet_float16.cpp - parquet_multi_file_info.cpp - parquet_metadata.cpp - parquet_prefetch_cost_model.cpp - parquet_reader.cpp - parquet_field_id.cpp - parquet_statistics.cpp - parquet_timestamp.cpp - parquet_writer.cpp - parquet_shredding.cpp - parquet_column_schema.cpp - parquet_geometry.cpp - serialize_parquet.cpp - zstd_file_system.cpp - parquet_types.cpp - TProtocol.cpp - Generating Code... - Compiling... - TTransportException.cpp - TBufferTransports.cpp - snappy.cc - snappy-sinksource.cc - lz4.cpp - dictionary_hash.cpp - backward_references_hq.cpp - histogram.cpp - memory.cpp - entropy_encode.cpp - compound_dictionary.cpp - compress_fragment_two_pass.cpp - block_splitter.cpp - command.cpp - encode.cpp - encoder_dict.cpp - cluster.cpp - backward_references.cpp - utf8_util.cpp - compress_fragment.cpp - Generating Code... - Compiling... - fast_log.cpp - brotli_bit_stream.cpp - bit_cost.cpp - static_dict.cpp - literal_cost.cpp - metablock.cpp - dictionary.cpp - constants.cpp - transform.cpp - platform.cpp - shared_dictionary.cpp - context.cpp - state.cpp - decode.cpp - huffman.cpp - bit_reader.cpp - Generating Code... - parquet_extension.cpp - parquet_extension.vcxproj -> C:\Work\GH\repos\duckdb-documentdb\build\extension\parquet\Release\parquet_extension.lib diff --git a/include/documentdb/documentdb.hpp b/include/documentdb/documentdb.hpp index 772d947..157a843 100644 --- a/include/documentdb/documentdb.hpp +++ b/include/documentdb/documentdb.hpp @@ -13,6 +13,8 @@ struct ConnectionConfig { std::string password; std::string auth_source; bool tls = false; + bool tls_allow_invalid_certificates = false; + int server_selection_timeout_ms = 5000; }; struct Document { diff --git a/src/documentdb_connection.cpp b/src/documentdb_connection.cpp index 97a69f7..8ba365f 100644 --- a/src/documentdb_connection.cpp +++ b/src/documentdb_connection.cpp @@ -1,22 +1,127 @@ #include "documentdb/documentdb.hpp" +#include +#include +#include +#include #include namespace documentdb { +namespace { + +template +using MongoHandle = std::unique_ptr; + +void initialize_driver() { + static std::once_flag initialized; + std::call_once(initialized, mongoc_init); +} + +MongoHandle create_uri(const ConnectionConfig& config) { + initialize_driver(); + MongoHandle uri( + mongoc_uri_new_for_host_port(config.host.c_str(), static_cast(config.port)), + mongoc_uri_destroy); + if (!uri) { + throw std::invalid_argument("invalid DocumentDB host or port"); + } + + if (!config.database.empty() && !mongoc_uri_set_database(uri.get(), config.database.c_str())) { + throw std::invalid_argument("invalid DocumentDB database name"); + } + if (!config.user.empty() && !mongoc_uri_set_username(uri.get(), config.user.c_str())) { + throw std::invalid_argument("invalid DocumentDB username"); + } + if (!config.password.empty() && !mongoc_uri_set_password(uri.get(), config.password.c_str())) { + throw std::invalid_argument("invalid DocumentDB password"); + } + if (!config.auth_source.empty() && !mongoc_uri_set_auth_source(uri.get(), config.auth_source.c_str())) { + throw std::invalid_argument("invalid DocumentDB authentication source"); + } + if (!mongoc_uri_set_option_as_bool(uri.get(), MONGOC_URI_TLS, config.tls) || + !mongoc_uri_set_option_as_bool(uri.get(), MONGOC_URI_TLSALLOWINVALIDCERTIFICATES, + config.tls_allow_invalid_certificates) || + !mongoc_uri_set_option_as_int32(uri.get(), MONGOC_URI_SERVERSELECTIONTIMEOUTMS, + config.server_selection_timeout_ms)) { + throw std::invalid_argument("invalid DocumentDB connection option"); + } + return uri; +} + +MongoHandle create_client(const ConnectionConfig& config) { + auto uri = create_uri(config); + bson_error_t error; + MongoHandle client( + mongoc_client_new_from_uri_with_error(uri.get(), &error), mongoc_client_destroy); + if (!client) { + throw std::runtime_error("failed to create DocumentDB client: " + std::string(error.message)); + } + mongoc_client_set_error_api(client.get(), MONGOC_ERROR_API_VERSION_2); + return client; +} + +void throw_cursor_error(mongoc_cursor_t* cursor, const std::string& operation) { + bson_error_t error; + if (mongoc_cursor_error(cursor, &error)) { + throw std::runtime_error(operation + ": " + error.message); + } +} + +} // namespace Connection::Connection(const ConnectionConfig& config) : config_(config) {} std::vector Connection::list_collections() const { - return {"orders", "users", "inventory"}; + auto client = create_client(config_); + MongoHandle database( + mongoc_client_get_database(client.get(), config_.database.c_str()), mongoc_database_destroy); + MongoHandle cursor( + mongoc_database_find_collections_with_opts(database.get(), nullptr), mongoc_cursor_destroy); + + std::vector collections; + const bson_t* document; + while (mongoc_cursor_next(cursor.get(), &document)) { + bson_iter_t name; + if (bson_iter_init_find(&name, document, "name") && BSON_ITER_HOLDS_UTF8(&name)) { + uint32_t length = 0; + const char* value = bson_iter_utf8(&name, &length); + collections.emplace_back(value, length); + } + } + throw_cursor_error(cursor.get(), "failed to list DocumentDB collections"); + return collections; } std::vector Connection::scan(const std::string& collection_name, const std::string& filter_json) const { + bson_error_t error; + MongoHandle filter( + bson_new_from_json(reinterpret_cast(filter_json.data()), + static_cast(filter_json.size()), &error), + bson_destroy); + if (!filter) { + throw std::invalid_argument("filter_json must contain a valid JSON object: " + std::string(error.message)); + } + + auto client = create_client(config_); + MongoHandle collection( + mongoc_client_get_collection(client.get(), config_.database.c_str(), collection_name.c_str()), + mongoc_collection_destroy); + MongoHandle cursor( + mongoc_collection_find_with_opts(collection.get(), filter.get(), nullptr, nullptr), mongoc_cursor_destroy); + std::vector rows; - Document row; - row.collection = collection_name; - row.raw_json = "{\"_id\":\"1\",\"collection\":\"" + collection_name + "\",\"filter\":\"" + filter_json + "\"}"; - rows.push_back(row); + const bson_t* result; + while (mongoc_cursor_next(cursor.get(), &result)) { + size_t json_length = 0; + char* json = bson_as_relaxed_extended_json(result, &json_length); + if (json == nullptr) { + throw std::runtime_error("failed to serialize a DocumentDB result"); + } + rows.push_back({std::string(json, json_length), collection_name}); + bson_free(json); + } + throw_cursor_error(cursor.get(), "failed to scan DocumentDB collection"); return rows; } diff --git a/src/documentdb_extension.cpp b/src/documentdb_extension.cpp index 3d358d8..7e27fd1 100644 --- a/src/documentdb_extension.cpp +++ b/src/documentdb_extension.cpp @@ -13,6 +13,7 @@ inline void DocumentDBVersionScalarFun(DataChunk &args, ExpressionState &state, auto &name_vector = args.data[0]; UnaryExecutor::Execute(name_vector, result, args.size(), [&](string_t name) { auto db_name = name.GetString(); + // TODO: Replace the scaffold version with the extension build version. return StringVector::AddString(result, "documentdb:" + db_name + " v0.1.0"); }); } @@ -21,6 +22,7 @@ inline void DocumentDBCollectionsScalarFun(DataChunk &args, ExpressionState &sta auto &name_vector = args.data[0]; UnaryExecutor::Execute(name_vector, result, args.size(), [&](string_t name) { (void)name; + // TODO: Replace the scaffold collection list with live DocumentDB discovery. return StringVector::AddString(result, R"(["orders","users","inventory"])" ); }); diff --git a/src/documentdb_schema.cpp b/src/documentdb_schema.cpp index 478ac83..503beb9 100644 --- a/src/documentdb_schema.cpp +++ b/src/documentdb_schema.cpp @@ -1,49 +1,27 @@ #include "documentdb/documentdb.hpp" +#include "yyjson.hpp" -#include #include #include #include +using namespace duckdb_yyjson; + namespace documentdb { namespace { -std::string trim(const std::string& value) { - size_t start = 0; - while (start < value.size() && std::isspace(static_cast(value[start])) != 0) { - ++start; - } - size_t end = value.size(); - while (end > start && std::isspace(static_cast(value[end - 1])) != 0) { - --end; - } - return value.substr(start, end - start); -} - -std::string infer_value_type(const std::string& value) { - std::string trimmed = trim(value); - if (trimmed.empty()) { - return "VARCHAR"; - } - if (trimmed.front() == '"') { - return "VARCHAR"; - } - if (trimmed == "true" || trimmed == "false") { +std::string infer_value_type(yyjson_val* value) { + if (yyjson_is_bool(value)) { return "BOOLEAN"; } - if (trimmed == "null") { - return "VARCHAR"; + if (yyjson_is_int(value) || yyjson_is_uint(value)) { + return "BIGINT"; } - bool has_dot = trimmed.find('.') != std::string::npos; - bool is_number = true; - for (char ch : trimmed) { - if ((ch < '0' || ch > '9') && ch != '-' && ch != '+' && ch != '.') { - is_number = false; - break; - } + if (yyjson_is_real(value)) { + return "DOUBLE"; } - if (is_number) { - return has_dot ? "DOUBLE" : "BIGINT"; + if (yyjson_is_str(value) || yyjson_is_null(value)) { + return "VARCHAR"; } return "VARCHAR"; } @@ -55,41 +33,22 @@ std::vector SchemaResolver::infer_from_samples(const std::vector inferred; for (const std::string& sample : samples) { - std::string text = sample; - size_t cursor = 0; - while (cursor < text.size()) { - size_t key_start = text.find('"', cursor); - if (key_start == std::string::npos) { - break; - } - size_t key_end = text.find('"', key_start + 1); - if (key_end == std::string::npos) { - break; - } - std::string key = text.substr(key_start + 1, key_end - key_start - 1); - size_t colon = text.find(':', key_end + 1); - if (colon == std::string::npos) { - break; - } - size_t value_start = text.find_first_not_of(" \t\r\n", colon + 1); - if (value_start == std::string::npos) { - break; - } - size_t value_end = value_start; - while (value_end < text.size()) { - char ch = text[value_end]; - if (ch == ',' || ch == '}') { - break; - } - ++value_end; - } - std::string value = text.substr(value_start, value_end - value_start); - std::string normalized = trim(value); - if (inferred.find(key) == inferred.end()) { - inferred[key] = infer_value_type(normalized); + yyjson_doc* document = yyjson_read(sample.data(), sample.size(), 0); + if (document == nullptr || !yyjson_is_obj(yyjson_doc_get_root(document))) { + yyjson_doc_free(document); + continue; + } + + size_t index, max; + yyjson_val* key; + yyjson_val* value; + yyjson_obj_foreach(yyjson_doc_get_root(document), index, max, key, value) { + std::string field_name(yyjson_get_str(key), yyjson_get_len(key)); + if (inferred.find(field_name) == inferred.end()) { + inferred[field_name] = infer_value_type(value); } - cursor = value_end; } + yyjson_doc_free(document); } for (const auto& entry : inferred) { diff --git a/tests/Dockerfile.e2e b/tests/Dockerfile.e2e new file mode 100644 index 0000000..0c2edce --- /dev/null +++ b/tests/Dockerfile.e2e @@ -0,0 +1,29 @@ +FROM ubuntu:24.04 + +RUN apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates \ + g++ \ + libmongoc-dev \ + pkg-config \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /workspace +COPY include/ include/ +COPY src/documentdb_connection.cpp src/documentdb_connection.cpp +COPY tests/documentdb_e2e_test.cpp tests/documentdb_e2e_test.cpp +COPY duckdb/third_party/yyjson/yyjson.cpp duckdb/third_party/yyjson/yyjson.cpp +COPY duckdb/third_party/yyjson/include/ duckdb/third_party/yyjson/include/ +COPY duckdb/src/include/ duckdb/src/include/ + +RUN g++ -std=c++17 -O2 \ + -Iinclude \ + -Iduckdb/third_party/yyjson/include \ + -Iduckdb/src/include \ + tests/documentdb_e2e_test.cpp \ + src/documentdb_connection.cpp \ + duckdb/third_party/yyjson/yyjson.cpp \ + $(pkg-config --cflags --libs libmongoc-1.0) \ + -o /usr/local/bin/documentdb_e2e_test + +ENTRYPOINT ["/usr/local/bin/documentdb_e2e_test"] \ No newline at end of file diff --git a/tests/documentdb_e2e_test.cpp b/tests/documentdb_e2e_test.cpp new file mode 100644 index 0000000..c07e681 --- /dev/null +++ b/tests/documentdb_e2e_test.cpp @@ -0,0 +1,52 @@ +#include "documentdb/documentdb.hpp" +#include "yyjson.hpp" + +#include +#include +#include +#include +#include + +using namespace duckdb_yyjson; + +namespace { + +std::string required_environment_variable(const char* name) { + const char* value = std::getenv(name); + if (value == nullptr || *value == '\0') { + throw std::runtime_error(std::string("missing environment variable: ") + name); + } + return value; +} + +} // namespace + +int main() { + documentdb::ConnectionConfig config; + config.host = required_environment_variable("DOCUMENTDB_HOST"); + config.port = 10260; + config.database = "duckdb_e2e"; + config.user = required_environment_variable("DOCUMENTDB_USER"); + config.password = required_environment_variable("DOCUMENTDB_PASSWORD"); + config.auth_source = "admin"; + config.tls = true; + config.tls_allow_invalid_certificates = true; + config.server_selection_timeout_ms = 15000; + + documentdb::Connection connection(config); + const std::string collection_name = "orders\"archive"; + auto collections = connection.list_collections(); + assert(std::find(collections.begin(), collections.end(), collection_name) != collections.end()); + + auto rows = connection.scan(collection_name, R"({"status":"active"})"); + assert(rows.size() == 1); + assert(rows.front().collection == collection_name); + + yyjson_doc* document = yyjson_read(rows.front().raw_json.data(), rows.front().raw_json.size(), 0); + assert(document != nullptr); + yyjson_val* root = yyjson_doc_get_root(document); + assert(std::string(yyjson_get_str(yyjson_obj_get(root, "status"))) == "active"); + assert(yyjson_get_int(yyjson_obj_get(root, "total")) == 99); + yyjson_doc_free(document); + return 0; +} \ No newline at end of file diff --git a/tests/documentdb_smoke_test.cpp b/tests/documentdb_smoke_test.cpp index 93f36d3..852510e 100644 --- a/tests/documentdb_smoke_test.cpp +++ b/tests/documentdb_smoke_test.cpp @@ -11,18 +11,9 @@ int main() { cfg.port = 27017; cfg.database = "app"; - documentdb::Connection conn(cfg); - auto collections = conn.list_collections(); - assert(!collections.empty()); - assert(std::find(collections.begin(), collections.end(), "orders") != collections.end()); - - auto rows = conn.scan("orders", "{\"status\": \"active\"}"); - assert(!rows.empty()); - assert(rows.front().collection == "orders"); - const std::vector sample_docs = { R"({"_id": 1, "status": "active", "total": 99.5})", - R"({"_id": 2, "status": "pending", "total": 49.0})" + R"({"_id": 2, "status": "pending", "total": 49.0, "metadata": {"region": "east,us"}})" }; auto schema = documentdb::SchemaResolver::infer_from_samples(sample_docs); @@ -30,6 +21,9 @@ int main() { assert(std::find_if(schema.begin(), schema.end(), [](const documentdb::FieldType& field) { return field.name == "status" && field.duckdb_type == "VARCHAR"; }) != schema.end()); + assert(std::find_if(schema.begin(), schema.end(), [](const documentdb::FieldType& field) { + return field.name == "metadata" && field.duckdb_type == "VARCHAR"; + }) != schema.end()); auto plan = documentdb::ScanPlanner::plan("orders", "{\"status\": \"active\"}", {"_id", "status"}, 10); assert(plan.collection_name == "orders"); diff --git a/tests/run_documentdb_e2e.sh b/tests/run_documentdb_e2e.sh new file mode 100755 index 0000000..c057124 --- /dev/null +++ b/tests/run_documentdb_e2e.sh @@ -0,0 +1,53 @@ +#!/usr/bin/env bash +set -euo pipefail + +documentdb_image="ghcr.io/documentdb/documentdb/documentdb-local:latest" +documentdb_container="duckdb-documentdb-e2e-db" +client_image="duckdb-documentdb-e2e-client" +network="duckdb-documentdb-e2e" +username="duckdb_e2e_admin" +password="E2e$(date +%s)${RANDOM}${RANDOM}Aa1!" + +cleanup() { + docker rm --force "${documentdb_container}" >/dev/null 2>&1 || true + docker network rm "${network}" >/dev/null 2>&1 || true +} +trap cleanup EXIT + +cleanup +docker network create "${network}" >/dev/null +docker run --detach --name "${documentdb_container}" --network "${network}" \ + "${documentdb_image}" --username "${username}" --password "${password}" --skip-init-data >/dev/null + +ready=false +for _ in $(seq 1 80); do + if docker exec "${documentdb_container}" mongosh localhost:10260 \ + -u "${username}" -p "${password}" --authenticationDatabase admin \ + --authenticationMechanism SCRAM-SHA-256 --tls --tlsAllowInvalidCertificates \ + --quiet --eval 'db.runCommand({ping:1}).ok' >/dev/null 2>&1; then + ready=true + break + fi + sleep 3 +done + +if [[ "${ready}" != "true" ]]; then + echo "DocumentDB Local did not become ready" >&2 + docker logs "${documentdb_container}" >&2 + exit 1 +fi + +seed='const c=db.getSiblingDB("duckdb_e2e").getCollection("orders\"archive"); c.drop(); c.insertMany([{status:"active",total:99},{status:"pending",total:49}]);' +docker exec "${documentdb_container}" mongosh localhost:10260 \ + -u "${username}" -p "${password}" --authenticationDatabase admin \ + --authenticationMechanism SCRAM-SHA-256 --tls --tlsAllowInvalidCertificates \ + --quiet --eval "${seed}" >/dev/null + +docker build --file tests/Dockerfile.e2e --tag "${client_image}" . +docker run --rm --network "${network}" \ + --env DOCUMENTDB_HOST="${documentdb_container}" \ + --env DOCUMENTDB_USER="${username}" \ + --env DOCUMENTDB_PASSWORD="${password}" \ + "${client_image}" + +echo "DocumentDB Docker E2E test passed." \ No newline at end of file diff --git a/vcpkg.json b/vcpkg.json new file mode 100644 index 0000000..ed0d49e --- /dev/null +++ b/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "duckdb-documentdb", + "version-string": "0.1.0", + "dependencies": [ + { + "name": "mongo-c-driver", + "features": [ + "openssl" + ] + } + ] +} \ No newline at end of file