Skip to content

Commit 4d7e247

Browse files
committed
wip
1 parent 094a43b commit 4d7e247

File tree

13 files changed

+38
-67
lines changed

13 files changed

+38
-67
lines changed

.github/workflows/ExtensionTemplate.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- uses: actions/checkout@v4
3535
with:
3636
fetch-depth: 0
37-
submodules: 'true'
37+
submodules: 'recursive'
3838

3939
- name: Checkout DuckDB to version
4040
if: ${{ matrix.duckdb_version != '<submodule_version>'}}
@@ -80,7 +80,7 @@ jobs:
8080
- uses: actions/checkout@v4
8181
with:
8282
fetch-depth: 0
83-
submodules: 'true'
83+
submodules: 'recursive'
8484

8585
- name: Install Ninja
8686
run: brew install ninja
@@ -131,7 +131,7 @@ jobs:
131131
- uses: actions/checkout@v4
132132
with:
133133
fetch-depth: 0
134-
submodules: 'true'
134+
submodules: 'recursive'
135135

136136
- uses: actions/setup-python@v2
137137
with:

.github/workflows/MainDistributionPipeline.yml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,20 @@
33
#
44
name: Main Extension Distribution Pipeline
55
on:
6-
push:
76
pull_request:
8-
workflow_dispatch:
97

108
concurrency:
119
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ github.ref != 'refs/heads/main' || github.sha }}
1210
cancel-in-progress: true
1311

1412
jobs:
15-
duckdb-next-build:
16-
name: Build extension binaries
17-
uses: duckdb/extension-ci-tools/.github/workflows/_extension_distribution.yml@main
18-
with:
19-
duckdb_version: main
20-
ci_tools_version: main
21-
extension_name: quack
22-
2313
duckdb-stable-build:
2414
name: Build extension binaries
25-
uses: duckdb/extension-ci-tools/.github/workflows/_extension_distribution.yml@v1.2.1
15+
uses: duckdb/extension-ci-tools/.github/workflows/_extension_distribution.yml@6a7a4f24c5999355ab36c0a6835baf891fc9d522
2616
with:
27-
duckdb_version: v1.2.1
28-
ci_tools_version: v1.2.1
29-
extension_name: quack
17+
duckdb_version: v1.2.2
18+
ci_tools_version: 6a7a4f24c5999355ab36c0a6835baf891fc9d522
19+
extension_name: vortex
20+
exclude_archs: "wasm_mvp;wasm_eh;wasm_threads;windows_amd64_rtools;windows_amd64_mingw;windows_amd64;linux_amd64_gcc4;linux_amd64_musl;linux_arm64;osx_amd64"
21+
extra_toolchains: "rust"
22+
override_ci_tools_repository: spiraldb/extension-ci-tools

.gitmodules

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,7 @@
88
branch = main
99
[submodule "duckdb"]
1010
path = duckdb
11-
url = https://github.com/duckdb/duckdb.git
11+
url = https://github.com/spiraldb/duckdb.git
12+
[submodule "vcpkg"]
13+
path = vcpkg
14+
url = git@github.com:microsoft/vcpkg.git

CMakeLists.txt

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,52 +4,24 @@ set(TARGET_NAME vortex)
44
project(${TARGET_NAME}_project)
55

66
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
7-
set(CMAKE_CXX_STANDARD 20)
7+
set(CMAKE_CXX_STANDARD 17)
88

99
include(FetchContent)
1010
FetchContent_Declare(
1111
Corrosion
1212
GIT_REPOSITORY https://github.com/corrosion-rs/corrosion.git
1313
GIT_TAG v0.5.1
1414
)
15-
FetchContent_Declare(
16-
vcpkg
17-
GIT_REPOSITORY https://github.com/microsoft/vcpkg.git
18-
GIT_TAG 2025.03.19
19-
)
20-
FetchContent_MakeAvailable(Corrosion)
21-
FetchContent_MakeAvailable(vcpkg)
22-
23-
# Install vcpkg dependencies.
24-
execute_process(
25-
COMMAND bash ./bootstrap-vcpkg.sh -disableMetrics
26-
WORKING_DIRECTORY "${vcpkg_SOURCE_DIR}"
27-
RESULT_VARIABLE VCPKG_BOOTSTRAP_RESULT
28-
)
29-
set(VCPKG_INSTALL_DIR "${CMAKE_BINARY_DIR}/vcpkg_installed")
30-
file(MAKE_DIRECTORY "${VCPKG_INSTALL_DIR}")
31-
execute_process(
32-
COMMAND "${vcpkg_SOURCE_DIR}/vcpkg" install --no-print-usage --x-manifest-root=${CMAKE_CURRENT_SOURCE_DIR}/vcpkg --x-install-root=${VCPKG_INSTALL_DIR}
33-
WORKING_DIRECTORY "${vcpkg_SOURCE_DIR}"
34-
)
3515

36-
if (APPLE AND CMAKE_SYSTEM_PROCESSOR MATCHES "arm64")
37-
set(CMAKE_PREFIX_PATH ${VCPKG_INSTALL_DIR}/arm64-osx)
38-
elseif (APPLE)
39-
set(CMAKE_PREFIX_PATH ${VCPKG_INSTALL_DIR}/x64-osx)
40-
elseif (UNIX AND NOT APPLE)
41-
set(CMAKE_PREFIX_PATH ${VCPKG_INSTALL_DIR}/x64-linux)
42-
endif ()
16+
FetchContent_MakeAvailable(Corrosion)
4317

4418
find_package(Catch2 CONFIG REQUIRED)
4519
find_package(Protobuf CONFIG REQUIRED)
4620
if (APPLE)
47-
find_library(CORE_FOUNDATION_FRAMEWORK CoreFoundation)
4821
find_library(SECURITY_FRAMEWORK Security)
4922
endif ()
5023

5124
corrosion_import_crate(MANIFEST_PATH vortex/Cargo.toml
52-
# CORROSION_TOOLS_RUST_TOOLCHAIN "nightly-2025-02-24"
5325
CRATES vortex-ffi
5426
FEATURES duckdb
5527
IMPORTED_CRATES vortex_ffi
@@ -73,13 +45,11 @@ build_loadable_extension(${TARGET_NAME} ${EXTENSION_SOURCES} ${PROTO_SRCS})
7345
target_link_libraries(${EXTENSION_NAME}
7446
vortex_ffi-static
7547
protobuf::libprotobuf
76-
${CORE_FOUNDATION_FRAMEWORK}
7748
${SECURITY_FRAMEWORK}
7849
)
7950
target_link_libraries(${LOADABLE_EXTENSION_NAME}
8051
vortex_ffi-shared
8152
protobuf::libprotobuf
82-
${CORE_FOUNDATION_FRAMEWORK}
8353
${SECURITY_FRAMEWORK}
8454
)
8555

Makefile

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
PROJ_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
22

3-
# Configuration of extension
43
EXT_NAME=vortex_duckdb
54
EXT_CONFIG=${PROJ_DIR}extension_config.cmake
6-
EXT_FLAGS=-DDISABLE_VPTR_SANITIZER=ON -DOVERRIDE_GIT_DESCRIBE=v1.2.2
7-
EXT_FLAGS += -DCMAKE_OSX_DEPLOYMENT_TARGET=13.0
5+
EXT_FLAGS=-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0 -DOVERRIDE_GIT_DESCRIBE=v1.2.2
86

9-
export MACOSX_DEPLOYMENT_TARGET=13.0
10-
export VCPKG_OSX_DEPLOYMENT_TARGET=13.0
7+
export MACOSX_DEPLOYMENT_TARGET=12.0
8+
export VCPKG_OSX_DEPLOYMENT_TARGET=12.0
119
export VCPKG_FEATURE_FLAGS=-binarycaching
10+
export VCPKG_TOOLCHAIN_PATH := ${PROJ_DIR}vcpkg/scripts/buildsystems/vcpkg.cmake
1211

13-
# Include the Makefile from extension-ci-tools
1412
include extension-ci-tools/makefiles/duckdb_extension.Makefile

duckdb

src/vortex_extension.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
#include "duckdb/main/extension_util.hpp"
66
#include "vortex_extension.hpp"
77

8-
#include <filesystem>
9-
108
#include "vortex_write.hpp"
119
#include "vortex_scan.hpp"
1210

src/vortex_scan.cpp

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,15 @@
77
#include "duckdb/main/extension_util.hpp"
88
#include "vortex_extension.hpp"
99

10-
#include <filesystem>
10+
#if __has_include(<filesystem>)
11+
#include <filesystem>
12+
namespace fs = std::filesystem;
13+
#elif __has_include(<experimental/filesystem>)
14+
#include <experimental/filesystem>
15+
namespace fs = std::experimental::filesystem;
16+
#else
17+
#error "No filesystem support available"
18+
#endif
1119

1220
#include "vortex_common.hpp"
1321
#include "expr/expr.hpp"
@@ -154,7 +162,7 @@ std::string EnsureFileProtocol(const std::string &path) {
154162
auto absolute_path = path;
155163
const std::string prefix = "file://";
156164

157-
std::filesystem::path p = absolute_path;
165+
fs::path p = absolute_path;
158166
if (!p.is_absolute()) {
159167
try {
160168
absolute_path = absolute(p).string();
@@ -366,7 +374,7 @@ void RegisterVortexScanFunction(DatabaseInstance &instance) {
366374

367375
// Most expressions are extracted from `PushdownComplexFilter`, the final filters come from `input.filters`.
368376
vector<vortex::expr::Expr *> conjuncts;
369-
std::ranges::copy(bind.conjuncts, std::back_inserter(conjuncts));
377+
std::copy(bind.conjuncts.begin(), bind.conjuncts.end(), std::back_inserter(conjuncts));
370378
CreateFilterExpression(*bind.arena, bind.column_names, input.filters, input.column_ids, conjuncts);
371379

372380
auto column_names = std::vector<char const *>();

vcpkg

Submodule vcpkg added at d6995a0

0 commit comments

Comments
 (0)