From 9256c10ae2d76790b954df4c1ab8cea7d982e887 Mon Sep 17 00:00:00 2001 From: ChenXing Yang <20001020ycx@gmail.com> Date: Mon, 22 Jun 2026 10:00:08 -0400 Subject: [PATCH 01/19] feat(velox-connector): Add Velox/Folly header dependencies to the build. Builds on the dependency Taskfile by adding the C++ dependencies needed to compile the plugin against the Presto/Velox headers: folly (built from source for its generated config header), glog, gflags, double-conversion, fast_float, xsimd, and re2, plus the compile-time include paths and PIC/AVX2 settings in CMakeLists.txt. Most of these are header-only for the plugin; their implementations are resolved at runtime by the Presto worker. --- taskfiles/velox-connector/deps.yaml | 168 ++++++++++++++++++++++++++-- taskfiles/velox-connector/main.yaml | 9 +- velox-connector/CMakeLists.txt | 27 +++-- velox-connector/README.md | 16 +-- 4 files changed, 188 insertions(+), 32 deletions(-) diff --git a/taskfiles/velox-connector/deps.yaml b/taskfiles/velox-connector/deps.yaml index 9ca0103..f7faac1 100644 --- a/taskfiles/velox-connector/deps.yaml +++ b/taskfiles/velox-connector/deps.yaml @@ -29,13 +29,20 @@ tasks: - "antlr-runtime" - "boost" - "date" + - "double-conversion" + - "fast_float" - "fmt" + - "folly" + - "gflags" + - "glog" - "log-surgeon" - "microsoft-gsl" - "msgpack-cxx" - "nlohmann-json" + - "re2" - "simdjson" - "spdlog" + - "xsimd" - "ystdlib" - "zstd" @@ -51,6 +58,10 @@ tasks: - "-DCMAKE_BUILD_TYPE=Release" - "-DCMAKE_CXX_STANDARD=20" - "-DCMAKE_INSTALL_MESSAGE=LAZY" + # The CLP dependencies' static libraries are linked into the plugin's shared object, so + # they are built position-independent. The velox/folly header-only dependencies + # (double-conversion, folly, gflags, glog, xsimd, fast_float) are never linked, so they + # omit this flag. - "-DCMAKE_POSITION_INDEPENDENT_CODE=ON" CMAKE_PACKAGE_NAME: "absl" CMAKE_SETTINGS_DIR: "{{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}" @@ -62,9 +73,9 @@ tasks: antlr-runtime: internal: true vars: - BUILD_DIR: "{{.G_DEPS_CPP_DIR}}/antlr4-runtime-build" - SOURCE_DIR: "{{.G_DEPS_CPP_DIR}}/antlr4-runtime-extracted" VERSION: "4.13.2" + G_ANTLR_RUNTIME_BUILD_DIR: "{{.G_DEPS_CPP_DIR}}/antlr4-runtime-build" + G_ANTLR_RUNTIME_SRC_DIR: "{{.G_DEPS_CPP_DIR}}/antlr4-runtime-extracted" run: "once" # NOTE: We can't use `yscope-dev-utils:cmake:install-remote-tar` (and by extension @@ -76,29 +87,29 @@ tasks: FILE_SHA256: "9f18272a9b32b622835a3365f850dd1063d60f5045fb1e12ce475ae6e18a35bb" INCLUDE_PATTERNS: ["*/runtime/Cpp"] NUM_COMPONENTS_TO_STRIP: 3 - OUTPUT_DIR: "{{.SOURCE_DIR}}" + OUTPUT_DIR: "{{.G_ANTLR_RUNTIME_SRC_DIR}}" URL: "https://github.com/antlr/antlr4/archive/refs/tags/{{.VERSION}}.tar.gz" - task: "yscope-dev-utils:cmake:generate" vars: - BUILD_DIR: "{{.BUILD_DIR}}" + BUILD_DIR: "{{.G_ANTLR_RUNTIME_BUILD_DIR}}" EXTRA_ARGS: - "-DANTLR4_INSTALL=ON" - "-DANTLR_BUILD_CPP_TESTS=OFF" - "-DCMAKE_BUILD_TYPE=Release" - "-DCMAKE_INSTALL_MESSAGE=LAZY" + - "-DCMAKE_POSITION_INDEPENDENT_CODE=ON" # Set CMP0135 so that extracted files use the current timestamp as their modification # timestamp, which ensures the library gets rebuilt if the extracted files change. - "-DCMAKE_POLICY_DEFAULT_CMP0135=NEW" - - "-DCMAKE_POSITION_INDEPENDENT_CODE=ON" - SOURCE_DIR: "{{.SOURCE_DIR}}" + SOURCE_DIR: "{{.G_ANTLR_RUNTIME_SRC_DIR}}" - task: "yscope-dev-utils:cmake:build" vars: - BUILD_DIR: "{{.BUILD_DIR}}" + BUILD_DIR: "{{.G_ANTLR_RUNTIME_BUILD_DIR}}" JOBS: "{{.G_CPP_MAX_PARALLELISM_PER_BUILD_TASK}}" - task: "yscope-dev-utils:cmake:install" vars: - BUILD_DIR: "{{.BUILD_DIR}}" + BUILD_DIR: "{{.G_ANTLR_RUNTIME_BUILD_DIR}}" CMAKE_PACKAGE_NAME: "antlr4-runtime" CMAKE_SETTINGS_DIR: "{{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}" INSTALL_PREFIX: "{{.G_DEPS_CPP_DIR}}/antlr4-runtime-install" @@ -111,17 +122,23 @@ tasks: cmds: - task: "yscope-dev-utils:boost:download-and-install" vars: + # Boost is linked into the plugin's shared object (via CLP), so it must be + # position-independent like the other CLP dependencies. Those are built with CMake and use + # -DCMAKE_POSITION_INDEPENDENT_CODE=ON; Boost is built with b2, which ignores that variable, + # so it needs these flags instead. BUILD_AND_INSTALL_ARGS: - "cxxflags=-fPIC" - "linkflags=-fPIC" CMAKE_SETTINGS_DIR: "{{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}" FILE_SHA256: "d6c69e4459eb5d6ec208250291221e7ff4a2affde9af6e49c9303b89c687461f" TARGETS: + - "context" - "filesystem" - "iostreams" - "process" - "program_options" - "regex" + - "thread" - "url" URL: "https://github.com/boostorg/boost/releases/download/boost-{{.VERSION}}/\ boost-{{.VERSION}}-b2-nodocs.tar.gz" @@ -145,6 +162,40 @@ tasks: TAR_URL: "https://github.com/HowardHinnant/date/archive/refs/tags/{{.VERSION}}.tar.gz" WORK_DIR: "{{.G_DEPS_CPP_DIR}}" + double-conversion: + internal: true + vars: + VERSION: "v3.3.0" + run: "once" + cmds: + - task: "yscope-dev-utils:cmake:install-remote-tar" + vars: + CMAKE_GEN_ARGS: + - "-DCMAKE_BUILD_TYPE=Release" + - "-DCMAKE_INSTALL_MESSAGE=LAZY" + CMAKE_PACKAGE_NAME: "double-conversion" + CMAKE_SETTINGS_DIR: "{{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}" + TAR_SHA256: "04ec44461850abbf33824da84978043b22554896b552c5fd11a9c5ae4b4d296e" + TAR_URL: "https://github.com/google/double-conversion/archive/refs/tags/{{.VERSION}}.tar.gz" + WORK_DIR: "{{.G_DEPS_CPP_DIR}}" + + fast_float: + internal: true + vars: + VERSION: "v8.0.0" + run: "once" + cmds: + - task: "yscope-dev-utils:cmake:install-remote-tar" + vars: + CMAKE_GEN_ARGS: + - "-DCMAKE_BUILD_TYPE=Release" + - "-DCMAKE_INSTALL_MESSAGE=LAZY" + CMAKE_PACKAGE_NAME: "fast_float" + CMAKE_SETTINGS_DIR: "{{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}" + TAR_SHA256: "f312f2dc34c61e665f4b132c0307d6f70ad9420185fa831911bc24408acf625d" + TAR_URL: "https://github.com/fastfloat/fast_float/archive/refs/tags/{{.VERSION}}.tar.gz" + WORK_DIR: "{{.G_DEPS_CPP_DIR}}" + fmt: internal: true vars: @@ -165,6 +216,77 @@ tasks: TAR_URL: "https://github.com/fmtlib/fmt/archive/refs/tags/{{.VERSION}}.tar.gz" WORK_DIR: "{{.G_DEPS_CPP_DIR}}" + folly: + internal: true + vars: + VERSION: "v2026.01.05.00" + run: "once" + deps: + - "boost" + - "double-conversion" + - "fast_float" + - "fmt" + - "gflags" + - "glog" + cmds: + - task: "yscope-dev-utils:cmake:install-remote-tar" + vars: + CMAKE_GEN_ARGS: + - "-C {{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}/{{.G_BOOST_LIB_NAME}}.cmake" + - "-C {{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}/{{.G_FMT_LIB_NAME}}.cmake" + - "-DDoubleConversion_ROOT={{.G_DEPS_CPP_DIR}}/double-conversion-install" + - "-DFastFloat_ROOT={{.G_DEPS_CPP_DIR}}/fast_float-install" + - "-DGflags_ROOT={{.G_DEPS_CPP_DIR}}/gflags-install" + - "-DGlog_ROOT={{.G_DEPS_CPP_DIR}}/glog-install" + - "-DCMAKE_POLICY_DEFAULT_CMP0074=NEW" + - "-DCMAKE_BUILD_TYPE=Release" + - "-DCMAKE_INSTALL_MESSAGE=LAZY" + CMAKE_PACKAGE_NAME: "folly" + CMAKE_SETTINGS_DIR: "{{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}" + TAR_SHA256: "31d05e867db6d4681989aca5f901079dbc33028e3139419fd5024b611689adea" + TAR_URL: "https://github.com/facebook/folly/archive/refs/tags/{{.VERSION}}.tar.gz" + WORK_DIR: "{{.G_DEPS_CPP_DIR}}" + + gflags: + internal: true + vars: + VERSION: "v2.2.2" + run: "once" + cmds: + - task: "yscope-dev-utils:cmake:install-remote-tar" + vars: + CMAKE_GEN_ARGS: + - "-DCMAKE_BUILD_TYPE=Release" + - "-DCMAKE_INSTALL_MESSAGE=LAZY" + CMAKE_PACKAGE_NAME: "gflags" + CMAKE_SETTINGS_DIR: "{{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}" + TAR_SHA256: "34af2f15cf7367513b352bdcd2493ab14ce43692d2dcd9dfc499492966c64dcf" + TAR_URL: "https://github.com/gflags/gflags/archive/refs/tags/{{.VERSION}}.tar.gz" + WORK_DIR: "{{.G_DEPS_CPP_DIR}}" + + glog: + internal: true + vars: + VERSION: "v0.6.0" + run: "once" + deps: + - "gflags" + cmds: + - task: "yscope-dev-utils:cmake:install-remote-tar" + vars: + CMAKE_GEN_ARGS: + - "-C {{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}/gflags.cmake" + - "-DBUILD_SHARED_LIBS=OFF" + - "-DCMAKE_BUILD_TYPE=Release" + - "-DCMAKE_INSTALL_MESSAGE=LAZY" + - "-DBUILD_TESTING=OFF" + - "-DWITH_UNWIND=OFF" + CMAKE_PACKAGE_NAME: "glog" + CMAKE_SETTINGS_DIR: "{{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}" + TAR_SHA256: "8a83bf982f37bb70825df71a9709fa90ea9f4447fb3c099e1d720a439d88bad6" + TAR_URL: "https://github.com/google/glog/archive/refs/tags/{{.VERSION}}.tar.gz" + WORK_DIR: "{{.G_DEPS_CPP_DIR}}" + log-surgeon: internal: true run: "once" @@ -257,6 +379,19 @@ tasks: TAR_URL: "https://github.com/nlohmann/json/archive/refs/tags/{{.VERSION}}.tar.gz" WORK_DIR: "{{.G_DEPS_CPP_DIR}}" + re2: + internal: true + vars: + VERSION: "2024-07-02" + run: "once" + cmds: + - task: "yscope-dev-utils:remote:download-and-extract-tar" + vars: + FILE_SHA256: "eb2df807c781601c14a260a507a5bb4509be1ee626024cb45acbd57cb9d4032b" + NUM_COMPONENTS_TO_STRIP: 1 + OUTPUT_DIR: "{{.G_DEPS_CPP_DIR}}/re2-source" + URL: "https://github.com/google/re2/archive/refs/tags/{{.VERSION}}.tar.gz" + simdjson: internal: true vars: @@ -300,6 +435,23 @@ tasks: TAR_URL: "https://github.com/gabime/spdlog/archive/refs/tags/{{.VERSION}}.tar.gz" WORK_DIR: "{{.G_DEPS_CPP_DIR}}" + xsimd: + internal: true + vars: + VERSION: "10.0.0" + run: "once" + cmds: + - task: "yscope-dev-utils:cmake:install-remote-tar" + vars: + CMAKE_GEN_ARGS: + - "-DCMAKE_BUILD_TYPE=Release" + - "-DCMAKE_INSTALL_MESSAGE=LAZY" + CMAKE_PACKAGE_NAME: "xsimd" + CMAKE_SETTINGS_DIR: "{{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}" + TAR_SHA256: "73f818368b3a4dad92fab1b2933d93694241bd2365a6181747b2df1768f6afdd" + TAR_URL: "https://github.com/xtensor-stack/xsimd/archive/refs/tags/{{.VERSION}}.tar.gz" + WORK_DIR: "{{.G_DEPS_CPP_DIR}}" + ystdlib: internal: true run: "once" diff --git a/taskfiles/velox-connector/main.yaml b/taskfiles/velox-connector/main.yaml index 6afd9cf..dc36020 100644 --- a/taskfiles/velox-connector/main.yaml +++ b/taskfiles/velox-connector/main.yaml @@ -31,7 +31,10 @@ tasks: - task: "utils:cmake:generate" vars: BUILD_DIR: "{{.G_VELOX_CONNECTOR_BUILD_DIR}}" - EXTRA_ARGS: - - "-DLIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_CMAKE_SETTINGS=\ - {{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}/all-deps.cmake" SOURCE_DIR: "{{.ROOT_DIR}}/velox-connector" + EXTRA_ARGS: + # Pin GCC 11: the dependencies are verified against it, and newer GCC versions can fail + # to build some of them. + - "-DCMAKE_C_COMPILER=gcc-11" + - "-DCMAKE_CXX_COMPILER=g++-11" + - "-DLIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_DIR={{.G_DEPS_CPP_DIR}}" diff --git a/velox-connector/CMakeLists.txt b/velox-connector/CMakeLists.txt index b5675a5..a730093 100644 --- a/velox-connector/CMakeLists.txt +++ b/velox-connector/CMakeLists.txt @@ -28,15 +28,12 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx2") # `fmt_ROOT`) that point to the `task`-installed dependencies. CMake's `find_package()` searches # `_ROOT` first, so the `task`-installed dependencies will be used instead of any system # packages. -set( - LIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_CMAKE_SETTINGS - "${CMAKE_CURRENT_LIST_DIR}/../build/velox-connector/deps/cpp/cmake-settings/all-deps.cmake" - CACHE - STRING - "Path to the CMake settings file describing this library's dependencies." +set(LIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_DIR + "${CMAKE_CURRENT_LIST_DIR}/../build/velox-connector/deps/cpp" + CACHE PATH "Directory containing task-installed dependencies." ) -include("${LIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_CMAKE_SETTINGS}" REQUIRED) +include("${LIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_DIR}/cmake-settings/all-deps.cmake" REQUIRED) # ============================================================================== # Presto/Velox framework headers @@ -58,7 +55,7 @@ set(PRESTO_ROOT ${presto_native_execution_SOURCE_DIR}/presto-native-execution) # CLP # ============================================================================== -# CLP options - only build what the plugin needs. +# CLP options - only build what the plugin needs. set(CLP_BUILD_CLP_REGEX_UTILS OFF CACHE BOOL "Build CLP regex utils") set(CLP_BUILD_CLP_S_ARCHIVEWRITER OFF CACHE BOOL "Build CLP-S archive writer") set(CLP_BUILD_CLP_S_FILTER OFF CACHE BOOL "Build CLP-S filter") @@ -80,6 +77,20 @@ FetchContent_MakeAvailable(clp) # Plugin target # ============================================================================== +# Compile-time include paths for the third-party headers transitively pulled in by the Velox +# headers. The libraries themselves are resolved at runtime by the Presto worker. +include_directories( + ${LIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_DIR}/absl-install/include + ${LIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_DIR}/boost-install/include + ${LIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_DIR}/double-conversion-install/include + ${LIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_DIR}/fmt-install/include + ${LIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_DIR}/folly-install/include + ${LIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_DIR}/gflags-install/include + ${LIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_DIR}/glog-install/include + ${LIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_DIR}/re2-source + ${LIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_DIR}/xsimd-install/include +) + # Plugin source tree add_subdirectory(src) diff --git a/velox-connector/README.md b/velox-connector/README.md index 13e11fc..677bc2a 100644 --- a/velox-connector/README.md +++ b/velox-connector/README.md @@ -2,18 +2,10 @@ ## Requirements -* An environment with Velox's [dependencies][velox-deps-setup] installed - * For example, Presto's dev container: - [prestodb/presto-native-dependency][presto-native-dependency] - * NOTE: Due a bug in GCC 12 that's used in the container, log-surgeon won't compile. Instead, - you'll need to explicitly set the following environment variables to point at GCC 11: - - ```shell - export CC="gcc" - export CXX="g++" - ``` - +* CMake 3.28+ +* GCC 11 (`g++-11`); newer GCC versions can fail to build some of the dependencies * [Task] >= 3.49.1 +* System libraries: `libssl-dev`, `libevent-dev`, `libcurl4-openssl-dev` ## Building @@ -31,6 +23,4 @@ cmake --build build/velox-connector -j The built plugin will be at `build/velox-connector/libclp-plugin-velox-connector.so`. -[presto-native-dependency]: https://hub.docker.com/r/prestodb/presto-native-dependency [Task]: https://taskfile.dev -[velox-deps-setup]: https://github.com/facebookincubator/velox#setting-up-dependencies From 632947aa438fa4d0664261a17b17c950a3ff4ed7 Mon Sep 17 00:00:00 2001 From: ChenXing Yang <20001020ycx@gmail.com> Date: Tue, 23 Jun 2026 16:36:01 -0400 Subject: [PATCH 02/19] clean up code for review --- taskfiles/velox-connector/deps.yaml | 24 ++++++++---------------- taskfiles/velox-connector/main.yaml | 4 ---- velox-connector/README.md | 19 ++++++++++++++++--- 3 files changed, 24 insertions(+), 23 deletions(-) diff --git a/taskfiles/velox-connector/deps.yaml b/taskfiles/velox-connector/deps.yaml index f7faac1..8c5a699 100644 --- a/taskfiles/velox-connector/deps.yaml +++ b/taskfiles/velox-connector/deps.yaml @@ -58,10 +58,6 @@ tasks: - "-DCMAKE_BUILD_TYPE=Release" - "-DCMAKE_CXX_STANDARD=20" - "-DCMAKE_INSTALL_MESSAGE=LAZY" - # The CLP dependencies' static libraries are linked into the plugin's shared object, so - # they are built position-independent. The velox/folly header-only dependencies - # (double-conversion, folly, gflags, glog, xsimd, fast_float) are never linked, so they - # omit this flag. - "-DCMAKE_POSITION_INDEPENDENT_CODE=ON" CMAKE_PACKAGE_NAME: "absl" CMAKE_SETTINGS_DIR: "{{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}" @@ -73,9 +69,9 @@ tasks: antlr-runtime: internal: true vars: + BUILD_DIR: "{{.G_DEPS_CPP_DIR}}/antlr4-runtime-build" + SOURCE_DIR: "{{.G_DEPS_CPP_DIR}}/antlr4-runtime-extracted" VERSION: "4.13.2" - G_ANTLR_RUNTIME_BUILD_DIR: "{{.G_DEPS_CPP_DIR}}/antlr4-runtime-build" - G_ANTLR_RUNTIME_SRC_DIR: "{{.G_DEPS_CPP_DIR}}/antlr4-runtime-extracted" run: "once" # NOTE: We can't use `yscope-dev-utils:cmake:install-remote-tar` (and by extension @@ -87,29 +83,29 @@ tasks: FILE_SHA256: "9f18272a9b32b622835a3365f850dd1063d60f5045fb1e12ce475ae6e18a35bb" INCLUDE_PATTERNS: ["*/runtime/Cpp"] NUM_COMPONENTS_TO_STRIP: 3 - OUTPUT_DIR: "{{.G_ANTLR_RUNTIME_SRC_DIR}}" + OUTPUT_DIR: "{{.SOURCE_DIR}}" URL: "https://github.com/antlr/antlr4/archive/refs/tags/{{.VERSION}}.tar.gz" - task: "yscope-dev-utils:cmake:generate" vars: - BUILD_DIR: "{{.G_ANTLR_RUNTIME_BUILD_DIR}}" + BUILD_DIR: "{{.BUILD_DIR}}" EXTRA_ARGS: - "-DANTLR4_INSTALL=ON" - "-DANTLR_BUILD_CPP_TESTS=OFF" - "-DCMAKE_BUILD_TYPE=Release" - "-DCMAKE_INSTALL_MESSAGE=LAZY" - - "-DCMAKE_POSITION_INDEPENDENT_CODE=ON" # Set CMP0135 so that extracted files use the current timestamp as their modification # timestamp, which ensures the library gets rebuilt if the extracted files change. - "-DCMAKE_POLICY_DEFAULT_CMP0135=NEW" - SOURCE_DIR: "{{.G_ANTLR_RUNTIME_SRC_DIR}}" + - "-DCMAKE_POSITION_INDEPENDENT_CODE=ON" + SOURCE_DIR: "{{.SOURCE_DIR}}" - task: "yscope-dev-utils:cmake:build" vars: - BUILD_DIR: "{{.G_ANTLR_RUNTIME_BUILD_DIR}}" + BUILD_DIR: "{{.BUILD_DIR}}" JOBS: "{{.G_CPP_MAX_PARALLELISM_PER_BUILD_TASK}}" - task: "yscope-dev-utils:cmake:install" vars: - BUILD_DIR: "{{.G_ANTLR_RUNTIME_BUILD_DIR}}" + BUILD_DIR: "{{.BUILD_DIR}}" CMAKE_PACKAGE_NAME: "antlr4-runtime" CMAKE_SETTINGS_DIR: "{{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}" INSTALL_PREFIX: "{{.G_DEPS_CPP_DIR}}/antlr4-runtime-install" @@ -122,10 +118,6 @@ tasks: cmds: - task: "yscope-dev-utils:boost:download-and-install" vars: - # Boost is linked into the plugin's shared object (via CLP), so it must be - # position-independent like the other CLP dependencies. Those are built with CMake and use - # -DCMAKE_POSITION_INDEPENDENT_CODE=ON; Boost is built with b2, which ignores that variable, - # so it needs these flags instead. BUILD_AND_INSTALL_ARGS: - "cxxflags=-fPIC" - "linkflags=-fPIC" diff --git a/taskfiles/velox-connector/main.yaml b/taskfiles/velox-connector/main.yaml index dc36020..6f629cd 100644 --- a/taskfiles/velox-connector/main.yaml +++ b/taskfiles/velox-connector/main.yaml @@ -33,8 +33,4 @@ tasks: BUILD_DIR: "{{.G_VELOX_CONNECTOR_BUILD_DIR}}" SOURCE_DIR: "{{.ROOT_DIR}}/velox-connector" EXTRA_ARGS: - # Pin GCC 11: the dependencies are verified against it, and newer GCC versions can fail - # to build some of them. - - "-DCMAKE_C_COMPILER=gcc-11" - - "-DCMAKE_CXX_COMPILER=g++-11" - "-DLIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_DIR={{.G_DEPS_CPP_DIR}}" diff --git a/velox-connector/README.md b/velox-connector/README.md index 677bc2a..e729591 100644 --- a/velox-connector/README.md +++ b/velox-connector/README.md @@ -2,10 +2,21 @@ ## Requirements -* CMake 3.28+ -* GCC 11 (`g++-11`); newer GCC versions can fail to build some of the dependencies * [Task] >= 3.49.1 -* System libraries: `libssl-dev`, `libevent-dev`, `libcurl4-openssl-dev` +* A build environment, set up either: + * Directly on your machine, with: + * CMake >= 3.28.3 and < 4.0 + * A C++20 compiler + * System libraries: `libssl-dev`, `libevent-dev`, `libcurl4-openssl-dev` + * In a container with Velox's [dependencies][velox-deps-setup] installed, such as Presto's dev + container ([prestodb/presto-native-dependency][presto-native-dependency]): + * NOTE: Due to a bug in the container's GCC 12, log-surgeon won't compile; set `CC`/`CXX` to + point at GCC 11 before building: + + ```shell + export CC="gcc" + export CXX="g++" + ``` ## Building @@ -23,4 +34,6 @@ cmake --build build/velox-connector -j The built plugin will be at `build/velox-connector/libclp-plugin-velox-connector.so`. +[presto-native-dependency]: https://hub.docker.com/r/prestodb/presto-native-dependency [Task]: https://taskfile.dev +[velox-deps-setup]: https://github.com/facebookincubator/velox#setting-up-dependencies From 85380037a797fea3af6a27e454d2d78858d09deb Mon Sep 17 00:00:00 2001 From: ChenXing Yang <20001020ycx@gmail.com> Date: Tue, 23 Jun 2026 21:26:43 -0400 Subject: [PATCH 03/19] refactor(velox-connector): Extract xsimd instead of building it. xsimd is header-only and consumed only through the plugin's include path, so download-and-extract it (like re2) rather than configuring/building it. Point the include path at xsimd-source/include. --- taskfiles/velox-connector/deps.yaml | 15 ++++++--------- velox-connector/CMakeLists.txt | 2 +- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/taskfiles/velox-connector/deps.yaml b/taskfiles/velox-connector/deps.yaml index 8c5a699..91a97b1 100644 --- a/taskfiles/velox-connector/deps.yaml +++ b/taskfiles/velox-connector/deps.yaml @@ -432,17 +432,14 @@ tasks: vars: VERSION: "10.0.0" run: "once" + cmds: - - task: "yscope-dev-utils:cmake:install-remote-tar" + - task: "yscope-dev-utils:remote:download-and-extract-tar" vars: - CMAKE_GEN_ARGS: - - "-DCMAKE_BUILD_TYPE=Release" - - "-DCMAKE_INSTALL_MESSAGE=LAZY" - CMAKE_PACKAGE_NAME: "xsimd" - CMAKE_SETTINGS_DIR: "{{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}" - TAR_SHA256: "73f818368b3a4dad92fab1b2933d93694241bd2365a6181747b2df1768f6afdd" - TAR_URL: "https://github.com/xtensor-stack/xsimd/archive/refs/tags/{{.VERSION}}.tar.gz" - WORK_DIR: "{{.G_DEPS_CPP_DIR}}" + FILE_SHA256: "73f818368b3a4dad92fab1b2933d93694241bd2365a6181747b2df1768f6afdd" + NUM_COMPONENTS_TO_STRIP: 1 + OUTPUT_DIR: "{{.G_DEPS_CPP_DIR}}/xsimd-source" + URL: "https://github.com/xtensor-stack/xsimd/archive/refs/tags/{{.VERSION}}.tar.gz" ystdlib: internal: true diff --git a/velox-connector/CMakeLists.txt b/velox-connector/CMakeLists.txt index 843f28f..beca750 100644 --- a/velox-connector/CMakeLists.txt +++ b/velox-connector/CMakeLists.txt @@ -93,7 +93,7 @@ include_directories( ${LIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_DIR}/gflags-install/include ${LIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_DIR}/glog-install/include ${LIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_DIR}/re2-source - ${LIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_DIR}/xsimd-install/include + ${LIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_DIR}/xsimd-source/include ) # Plugin source tree From 79766efb94189010c67dd4f111da9e1280bc246e Mon Sep 17 00:00:00 2001 From: ChenXing Yang <20001020ycx@gmail.com> Date: Tue, 23 Jun 2026 21:31:23 -0400 Subject: [PATCH 04/19] fix(velox-connector): Drop no-op REQUIRED from the include() call. include() doesn't accept REQUIRED (valid keywords are OPTIONAL, RESULT_VARIABLE, NO_POLICY_SCOPE); it's a no-op since include() already errors on a missing file. --- velox-connector/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/velox-connector/CMakeLists.txt b/velox-connector/CMakeLists.txt index beca750..30e98b7 100644 --- a/velox-connector/CMakeLists.txt +++ b/velox-connector/CMakeLists.txt @@ -36,7 +36,7 @@ set(LIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_DIR CACHE PATH "Directory containing task-installed dependencies." ) -include("${LIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_DIR}/cmake-settings/all-deps.cmake" REQUIRED) +include("${LIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_DIR}/cmake-settings/all-deps.cmake") # ============================================================================== # Presto/Velox framework headers From 087cf368a49d44388c07ffcf5426ecd462b43f3b Mon Sep 17 00:00:00 2001 From: ChenXing Yang <20001020ycx@gmail.com> Date: Fri, 26 Jun 2026 14:50:27 -0400 Subject: [PATCH 05/19] add version explanation in deps.yaml --- taskfiles/velox-connector/deps.yaml | 31 +++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/taskfiles/velox-connector/deps.yaml b/taskfiles/velox-connector/deps.yaml index 91a97b1..e6ef7c0 100644 --- a/taskfiles/velox-connector/deps.yaml +++ b/taskfiles/velox-connector/deps.yaml @@ -12,6 +12,17 @@ vars: G_GSL_LIB_NAME: "Microsoft.GSL" G_YSTDLIB_LIB_NAME: "ystdlib" + # Velox header-dependency versions, kept in sync with Velox commit pinned in + # `velox-connector/CMakeLists.txt` (6e1942b72a9f32191dcd0ba49812f2ac96a25615): + G_DOUBLE_CONVERSION_VERSION: "v3.1.5" + G_FAST_FLOAT_VERSION: "v8.0.2" + G_FMT_VERSION: "11.2.0" + G_FOLLY_VERSION: "v2026.01.05.00" + G_GFLAGS_VERSION: "v2.2.2" + G_GLOG_VERSION: "v0.6.0" + G_RE2_VERSION: "2024-07-02" + G_XSIMD_VERSION: "10.0.0" + tasks: install-all: cmds: @@ -157,7 +168,7 @@ tasks: double-conversion: internal: true vars: - VERSION: "v3.3.0" + VERSION: "{{.G_DOUBLE_CONVERSION_VERSION}}" run: "once" cmds: - task: "yscope-dev-utils:cmake:install-remote-tar" @@ -167,14 +178,14 @@ tasks: - "-DCMAKE_INSTALL_MESSAGE=LAZY" CMAKE_PACKAGE_NAME: "double-conversion" CMAKE_SETTINGS_DIR: "{{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}" - TAR_SHA256: "04ec44461850abbf33824da84978043b22554896b552c5fd11a9c5ae4b4d296e" + TAR_SHA256: "a63ecb93182134ba4293fd5f22d6e08ca417caafa244afaa751cbfddf6415b13" TAR_URL: "https://github.com/google/double-conversion/archive/refs/tags/{{.VERSION}}.tar.gz" WORK_DIR: "{{.G_DEPS_CPP_DIR}}" fast_float: internal: true vars: - VERSION: "v8.0.0" + VERSION: "{{.G_FAST_FLOAT_VERSION}}" run: "once" cmds: - task: "yscope-dev-utils:cmake:install-remote-tar" @@ -184,14 +195,14 @@ tasks: - "-DCMAKE_INSTALL_MESSAGE=LAZY" CMAKE_PACKAGE_NAME: "fast_float" CMAKE_SETTINGS_DIR: "{{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}" - TAR_SHA256: "f312f2dc34c61e665f4b132c0307d6f70ad9420185fa831911bc24408acf625d" + TAR_SHA256: "e14a33089712b681d74d94e2a11362643bd7d769ae8f7e7caefe955f57f7eacd" TAR_URL: "https://github.com/fastfloat/fast_float/archive/refs/tags/{{.VERSION}}.tar.gz" WORK_DIR: "{{.G_DEPS_CPP_DIR}}" fmt: internal: true vars: - VERSION: "11.2.0" + VERSION: "{{.G_FMT_VERSION}}" run: "once" cmds: - task: "yscope-dev-utils:cmake:install-remote-tar" @@ -211,7 +222,7 @@ tasks: folly: internal: true vars: - VERSION: "v2026.01.05.00" + VERSION: "{{.G_FOLLY_VERSION}}" run: "once" deps: - "boost" @@ -242,7 +253,7 @@ tasks: gflags: internal: true vars: - VERSION: "v2.2.2" + VERSION: "{{.G_GFLAGS_VERSION}}" run: "once" cmds: - task: "yscope-dev-utils:cmake:install-remote-tar" @@ -259,7 +270,7 @@ tasks: glog: internal: true vars: - VERSION: "v0.6.0" + VERSION: "{{.G_GLOG_VERSION}}" run: "once" deps: - "gflags" @@ -374,7 +385,7 @@ tasks: re2: internal: true vars: - VERSION: "2024-07-02" + VERSION: "{{.G_RE2_VERSION}}" run: "once" cmds: - task: "yscope-dev-utils:remote:download-and-extract-tar" @@ -430,7 +441,7 @@ tasks: xsimd: internal: true vars: - VERSION: "10.0.0" + VERSION: "{{.G_XSIMD_VERSION}}" run: "once" cmds: From a81a4e7c23699067ef008d56f078dd1f69dc0939 Mon Sep 17 00:00:00 2001 From: ChenXing Yang <60459812+20001020ycx@users.noreply.github.com> Date: Mon, 29 Jun 2026 09:42:58 -0400 Subject: [PATCH 06/19] Update velox-connector/README.md Co-authored-by: kirkrodrigues <2454684+kirkrodrigues@users.noreply.github.com> --- velox-connector/README.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/velox-connector/README.md b/velox-connector/README.md index e729591..94b32bc 100644 --- a/velox-connector/README.md +++ b/velox-connector/README.md @@ -3,15 +3,18 @@ ## Requirements * [Task] >= 3.49.1 -* A build environment, set up either: - * Directly on your machine, with: +* One of the following build environments: + * A machine with: * CMake >= 3.28.3 and < 4.0 * A C++20 compiler - * System libraries: `libssl-dev`, `libevent-dev`, `libcurl4-openssl-dev` - * In a container with Velox's [dependencies][velox-deps-setup] installed, such as Presto's dev + * The following libraries: + * `libcurl4-openssl-dev` + * `libevent-dev` + * `libssl-dev` + * A container with Velox's [dependencies][velox-deps-setup] installed, such as Presto's dev container ([prestodb/presto-native-dependency][presto-native-dependency]): - * NOTE: Due to a bug in the container's GCC 12, log-surgeon won't compile; set `CC`/`CXX` to - point at GCC 11 before building: + * NOTE: Due to a bug in the container's GCC 12, log-surgeon won't compile; Instead, set + `CC`/`CXX` to point at GCC 11 before building: ```shell export CC="gcc" From 9e1f2a00ef29af12c09a5ab86f26d26ca42ab29d Mon Sep 17 00:00:00 2001 From: ChenXing Yang <20001020ycx@gmail.com> Date: Mon, 29 Jun 2026 09:49:03 -0400 Subject: [PATCH 07/19] fix(velox-connector): Satisfy yamllint in deps.yaml. Drop a trailing space on the version comment and wrap the double-conversion URL (>100 chars) using the backslash-continuation style used by the other deps. --- taskfiles/velox-connector/deps.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/taskfiles/velox-connector/deps.yaml b/taskfiles/velox-connector/deps.yaml index e6ef7c0..89cee86 100644 --- a/taskfiles/velox-connector/deps.yaml +++ b/taskfiles/velox-connector/deps.yaml @@ -12,7 +12,7 @@ vars: G_GSL_LIB_NAME: "Microsoft.GSL" G_YSTDLIB_LIB_NAME: "ystdlib" - # Velox header-dependency versions, kept in sync with Velox commit pinned in + # Velox header-dependency versions, kept in sync with the Velox commit pinned in # `velox-connector/CMakeLists.txt` (6e1942b72a9f32191dcd0ba49812f2ac96a25615): G_DOUBLE_CONVERSION_VERSION: "v3.1.5" G_FAST_FLOAT_VERSION: "v8.0.2" @@ -179,7 +179,8 @@ tasks: CMAKE_PACKAGE_NAME: "double-conversion" CMAKE_SETTINGS_DIR: "{{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}" TAR_SHA256: "a63ecb93182134ba4293fd5f22d6e08ca417caafa244afaa751cbfddf6415b13" - TAR_URL: "https://github.com/google/double-conversion/archive/refs/tags/{{.VERSION}}.tar.gz" + TAR_URL: "https://github.com/google/double-conversion/archive/refs/tags/\ + {{.VERSION}}.tar.gz" WORK_DIR: "{{.G_DEPS_CPP_DIR}}" fast_float: From 98abcb2f57141d03c0ab142fa0ff7a8ae536d668 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Jun 2026 17:11:44 -0700 Subject: [PATCH 08/19] build(deps): Bump com.fasterxml.jackson.core:jackson-databind from 2.15.4 to 2.22.0 in /presto-connector (#16) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- presto-connector/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/presto-connector/pom.xml b/presto-connector/pom.xml index 28e55c2..7a8390b 100644 --- a/presto-connector/pom.xml +++ b/presto-connector/pom.xml @@ -38,7 +38,7 @@ - 2.15.4 + 2.22.0 0.297 0.38 From b4ac08cfc1a427c36e5e013b801db3f65feeff23 Mon Sep 17 00:00:00 2001 From: ChenXing Yang <20001020ycx@gmail.com> Date: Tue, 30 Jun 2026 14:19:24 -0400 Subject: [PATCH 09/19] refactor(velox-connector): Source Velox header include paths from all-deps.cmake. The installed Velox header deps' include paths now come from the _ROOT cache variables all-deps.cmake provides (the same source CLP's find_package() uses), instead of hardcoding the -install/include paths. re2 and xsimd are extracted rather than installed, so they have no _ROOT and keep their source directories. --- velox-connector/CMakeLists.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/velox-connector/CMakeLists.txt b/velox-connector/CMakeLists.txt index 30e98b7..ed0d3f6 100644 --- a/velox-connector/CMakeLists.txt +++ b/velox-connector/CMakeLists.txt @@ -85,13 +85,13 @@ FetchContent_MakeAvailable(clp) # Compile-time include paths for the third-party headers transitively pulled in by the Velox # headers. The libraries themselves are resolved at runtime by the Presto worker. include_directories( - ${LIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_DIR}/absl-install/include - ${LIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_DIR}/boost-install/include - ${LIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_DIR}/double-conversion-install/include - ${LIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_DIR}/fmt-install/include - ${LIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_DIR}/folly-install/include - ${LIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_DIR}/gflags-install/include - ${LIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_DIR}/glog-install/include + ${absl_ROOT}/include + ${Boost_ROOT}/include + ${double-conversion_ROOT}/include + ${fmt_ROOT}/include + ${folly_ROOT}/include + ${gflags_ROOT}/include + ${glog_ROOT}/include ${LIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_DIR}/re2-source ${LIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_DIR}/xsimd-source/include ) From c2aa5c21f1b61c076b24bf229af18be0961a3107 Mon Sep 17 00:00:00 2001 From: ChenXing Yang <20001020ycx@gmail.com> Date: Thu, 2 Jul 2026 12:06:33 -0400 Subject: [PATCH 10/19] refactor(velox-connector): Single-source dependency roots and the Presto commit tag. - Expose re2/xsimd via _ROOT in all-deps.cmake so CMakeLists.txt references them consistently with the other dependencies. - Define the Presto commit once as G_PRESTO_GIT_TAG and pass it to CMake, removing the hash that was duplicated in CMakeLists.txt. --- taskfiles/velox-connector/deps.yaml | 23 +++++++++++++++++++++-- taskfiles/velox-connector/main.yaml | 6 ++++-- velox-connector/CMakeLists.txt | 23 ++++++++++++++++------- 3 files changed, 41 insertions(+), 11 deletions(-) diff --git a/taskfiles/velox-connector/deps.yaml b/taskfiles/velox-connector/deps.yaml index 89cee86..037509b 100644 --- a/taskfiles/velox-connector/deps.yaml +++ b/taskfiles/velox-connector/deps.yaml @@ -6,14 +6,21 @@ includes: vars: G_DEPS_CPP_CMAKE_SETTINGS_DIR: "{{.G_DEPS_CPP_DIR}}/cmake-settings" + # The Presto commit that the Velox connector is built against. + # + # NOTE: This references the upstream OSS commit, contributed by YScope, that makes the plugin + # possible. This functionality isn't bundled with any Presto release yet. + # + # TODO: Update this to the `release-0.299` tag once it's available. + G_PRESTO_GIT_TAG: "6e1942b72a9f32191dcd0ba49812f2ac96a25615" + # Library names (must match CMake package names for settings files) G_BOOST_LIB_NAME: "Boost" G_FMT_LIB_NAME: "fmt" G_GSL_LIB_NAME: "Microsoft.GSL" G_YSTDLIB_LIB_NAME: "ystdlib" - # Velox header-dependency versions, kept in sync with the Velox commit pinned in - # `velox-connector/CMakeLists.txt` (6e1942b72a9f32191dcd0ba49812f2ac96a25615): + # Velox header-dependency versions, kept in sync with the Velox bundled in `G_PRESTO_GIT_TAG`: G_DOUBLE_CONVERSION_VERSION: "v3.1.5" G_FAST_FLOAT_VERSION: "v8.0.2" G_FMT_VERSION: "11.2.0" @@ -395,6 +402,12 @@ tasks: NUM_COMPONENTS_TO_STRIP: 1 OUTPUT_DIR: "{{.G_DEPS_CPP_DIR}}/re2-source" URL: "https://github.com/google/re2/archive/refs/tags/{{.VERSION}}.tar.gz" + - >- + echo "set(re2_ROOT + \"{{.G_DEPS_CPP_DIR}}/re2-source\" + CACHE PATH + \"Package root for re2.\" + )" > "{{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}/re2.cmake" simdjson: internal: true @@ -452,6 +465,12 @@ tasks: NUM_COMPONENTS_TO_STRIP: 1 OUTPUT_DIR: "{{.G_DEPS_CPP_DIR}}/xsimd-source" URL: "https://github.com/xtensor-stack/xsimd/archive/refs/tags/{{.VERSION}}.tar.gz" + - >- + echo "set(xsimd_ROOT + \"{{.G_DEPS_CPP_DIR}}/xsimd-source\" + CACHE PATH + \"Package root for xsimd.\" + )" > "{{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}/xsimd.cmake" ystdlib: internal: true diff --git a/taskfiles/velox-connector/main.yaml b/taskfiles/velox-connector/main.yaml index 6f629cd..61f0886 100644 --- a/taskfiles/velox-connector/main.yaml +++ b/taskfiles/velox-connector/main.yaml @@ -31,6 +31,8 @@ tasks: - task: "utils:cmake:generate" vars: BUILD_DIR: "{{.G_VELOX_CONNECTOR_BUILD_DIR}}" - SOURCE_DIR: "{{.ROOT_DIR}}/velox-connector" EXTRA_ARGS: - - "-DLIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_DIR={{.G_DEPS_CPP_DIR}}" + - "-DLIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_CMAKE_SETTINGS=\ + {{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}/all-deps.cmake" + - "-DPRESTO_GIT_TAG={{.G_PRESTO_GIT_TAG}}" + SOURCE_DIR: "{{.ROOT_DIR}}/velox-connector" diff --git a/velox-connector/CMakeLists.txt b/velox-connector/CMakeLists.txt index ed0d3f6..84a16ae 100644 --- a/velox-connector/CMakeLists.txt +++ b/velox-connector/CMakeLists.txt @@ -31,19 +31,28 @@ endif() # `fmt_ROOT`) that point to the `task`-installed dependencies. CMake's `find_package()` searches # `_ROOT` first, so the `task`-installed dependencies will be used instead of any system # packages. -set(LIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_DIR - "${CMAKE_CURRENT_LIST_DIR}/../build/velox-connector/deps/cpp" - CACHE PATH "Directory containing task-installed dependencies." +set( + LIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_CMAKE_SETTINGS + "${CMAKE_CURRENT_LIST_DIR}/../build/velox-connector/deps/cpp/cmake-settings/all-deps.cmake" + CACHE + STRING + "Path to the CMake settings file describing this library's dependencies." ) -include("${LIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_DIR}/cmake-settings/all-deps.cmake") +include("${LIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_CMAKE_SETTINGS}") # ============================================================================== # Presto/Velox framework headers # ============================================================================== include(FetchContent) -set(PRESTO_GIT_TAG "6e1942b72a9f32191dcd0ba49812f2ac96a25615") +set(PRESTO_GIT_TAG "" CACHE STRING "Presto commit that provides the Velox framework headers.") +if(NOT PRESTO_GIT_TAG) + message(FATAL_ERROR + "PRESTO_GIT_TAG is not set. Build via `task velox-connector:build`, or pass " + "`-DPRESTO_GIT_TAG=` when configuring CMake directly." + ) +endif() message(STATUS "Downloading presto for headers (commit: ${PRESTO_GIT_TAG})") FetchContent_Declare( @@ -92,8 +101,8 @@ include_directories( ${folly_ROOT}/include ${gflags_ROOT}/include ${glog_ROOT}/include - ${LIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_DIR}/re2-source - ${LIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_DIR}/xsimd-source/include + ${re2_ROOT} + ${xsimd_ROOT}/include ) # Plugin source tree From d17825898dee1d8030b73f332f6fb52ee8f6d23a Mon Sep 17 00:00:00 2001 From: ChenXing Yang <20001020ycx@gmail.com> Date: Thu, 2 Jul 2026 16:31:35 -0400 Subject: [PATCH 11/19] fix(presto-connector): Restore jackson version properties dropped during main merge. --- presto-connector/pom.xml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/presto-connector/pom.xml b/presto-connector/pom.xml index b5bff06..2814897 100644 --- a/presto-connector/pom.xml +++ b/presto-connector/pom.xml @@ -38,6 +38,11 @@ + 2.22.0 + + 2.22 0.297 0.38 @@ -45,10 +50,6 @@ 0.229 33.6.0-jre 6.0.0 - - 2.22 9.7.0 From f213ad2c88d1ef882d24a48a7f927030476b3516 Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Tue, 7 Jul 2026 17:40:28 -0400 Subject: [PATCH 12/19] Rename fast_float task to fast-float to follow convention and it doesn't need to match the library name. --- taskfiles/velox-connector/deps.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/taskfiles/velox-connector/deps.yaml b/taskfiles/velox-connector/deps.yaml index 037509b..e94f9ed 100644 --- a/taskfiles/velox-connector/deps.yaml +++ b/taskfiles/velox-connector/deps.yaml @@ -48,7 +48,7 @@ tasks: - "boost" - "date" - "double-conversion" - - "fast_float" + - "fast-float" - "fmt" - "folly" - "gflags" @@ -190,7 +190,7 @@ tasks: {{.VERSION}}.tar.gz" WORK_DIR: "{{.G_DEPS_CPP_DIR}}" - fast_float: + fast-float: internal: true vars: VERSION: "{{.G_FAST_FLOAT_VERSION}}" @@ -235,7 +235,7 @@ tasks: deps: - "boost" - "double-conversion" - - "fast_float" + - "fast-float" - "fmt" - "gflags" - "glog" From 9b81b19466ff270751b42a240311fce3e0cdb002 Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Tue, 7 Jul 2026 17:48:27 -0400 Subject: [PATCH 13/19] Replace repeated library names with global variables. --- taskfiles/velox-connector/deps.yaml | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/taskfiles/velox-connector/deps.yaml b/taskfiles/velox-connector/deps.yaml index e94f9ed..4e1cec2 100644 --- a/taskfiles/velox-connector/deps.yaml +++ b/taskfiles/velox-connector/deps.yaml @@ -16,7 +16,11 @@ vars: # Library names (must match CMake package names for settings files) G_BOOST_LIB_NAME: "Boost" + G_DOUBLE_CONVERSION_LIB_NAME: "double-conversion" + G_FAST_FLOAT_LIB_NAME: "fast_float" G_FMT_LIB_NAME: "fmt" + G_GFLAGS_LIB_NAME: "gflags" + G_GLOG_LIB_NAME: "glog" G_GSL_LIB_NAME: "Microsoft.GSL" G_YSTDLIB_LIB_NAME: "ystdlib" @@ -183,7 +187,7 @@ tasks: CMAKE_GEN_ARGS: - "-DCMAKE_BUILD_TYPE=Release" - "-DCMAKE_INSTALL_MESSAGE=LAZY" - CMAKE_PACKAGE_NAME: "double-conversion" + CMAKE_PACKAGE_NAME: "{{.G_DOUBLE_CONVERSION_LIB_NAME}}" CMAKE_SETTINGS_DIR: "{{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}" TAR_SHA256: "a63ecb93182134ba4293fd5f22d6e08ca417caafa244afaa751cbfddf6415b13" TAR_URL: "https://github.com/google/double-conversion/archive/refs/tags/\ @@ -201,7 +205,7 @@ tasks: CMAKE_GEN_ARGS: - "-DCMAKE_BUILD_TYPE=Release" - "-DCMAKE_INSTALL_MESSAGE=LAZY" - CMAKE_PACKAGE_NAME: "fast_float" + CMAKE_PACKAGE_NAME: "{{.G_FAST_FLOAT_LIB_NAME}}" CMAKE_SETTINGS_DIR: "{{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}" TAR_SHA256: "e14a33089712b681d74d94e2a11362643bd7d769ae8f7e7caefe955f57f7eacd" TAR_URL: "https://github.com/fastfloat/fast_float/archive/refs/tags/{{.VERSION}}.tar.gz" @@ -245,10 +249,11 @@ tasks: CMAKE_GEN_ARGS: - "-C {{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}/{{.G_BOOST_LIB_NAME}}.cmake" - "-C {{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}/{{.G_FMT_LIB_NAME}}.cmake" - - "-DDoubleConversion_ROOT={{.G_DEPS_CPP_DIR}}/double-conversion-install" - - "-DFastFloat_ROOT={{.G_DEPS_CPP_DIR}}/fast_float-install" - - "-DGflags_ROOT={{.G_DEPS_CPP_DIR}}/gflags-install" - - "-DGlog_ROOT={{.G_DEPS_CPP_DIR}}/glog-install" + - >- + -DDoubleConversion_ROOT={{.G_DEPS_CPP_DIR}}/{{.G_DOUBLE_CONVERSION_LIB_NAME}}-install + - "-DFastFloat_ROOT={{.G_DEPS_CPP_DIR}}/{{.G_FAST_FLOAT_LIB_NAME}}-install" + - "-DGflags_ROOT={{.G_DEPS_CPP_DIR}}/{{.G_GFLAGS_LIB_NAME}}-install" + - "-DGlog_ROOT={{.G_DEPS_CPP_DIR}}/{{.G_GLOG_LIB_NAME}}-install" - "-DCMAKE_POLICY_DEFAULT_CMP0074=NEW" - "-DCMAKE_BUILD_TYPE=Release" - "-DCMAKE_INSTALL_MESSAGE=LAZY" @@ -269,7 +274,7 @@ tasks: CMAKE_GEN_ARGS: - "-DCMAKE_BUILD_TYPE=Release" - "-DCMAKE_INSTALL_MESSAGE=LAZY" - CMAKE_PACKAGE_NAME: "gflags" + CMAKE_PACKAGE_NAME: "{{.G_GFLAGS_LIB_NAME}}" CMAKE_SETTINGS_DIR: "{{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}" TAR_SHA256: "34af2f15cf7367513b352bdcd2493ab14ce43692d2dcd9dfc499492966c64dcf" TAR_URL: "https://github.com/gflags/gflags/archive/refs/tags/{{.VERSION}}.tar.gz" @@ -286,13 +291,13 @@ tasks: - task: "yscope-dev-utils:cmake:install-remote-tar" vars: CMAKE_GEN_ARGS: - - "-C {{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}/gflags.cmake" + - "-C {{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}/{{.G_GFLAGS_LIB_NAME}}.cmake" - "-DBUILD_SHARED_LIBS=OFF" - "-DCMAKE_BUILD_TYPE=Release" - "-DCMAKE_INSTALL_MESSAGE=LAZY" - "-DBUILD_TESTING=OFF" - "-DWITH_UNWIND=OFF" - CMAKE_PACKAGE_NAME: "glog" + CMAKE_PACKAGE_NAME: "{{.G_GLOG_LIB_NAME}}" CMAKE_SETTINGS_DIR: "{{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}" TAR_SHA256: "8a83bf982f37bb70825df71a9709fa90ea9f4447fb3c099e1d720a439d88bad6" TAR_URL: "https://github.com/google/glog/archive/refs/tags/{{.VERSION}}.tar.gz" From 69798c6332009ea7b9ce0be1975a8b357d5d6332 Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Tue, 7 Jul 2026 17:49:17 -0400 Subject: [PATCH 14/19] Turn WITH_GTEST off to reduce unnecessary output. --- taskfiles/velox-connector/deps.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/taskfiles/velox-connector/deps.yaml b/taskfiles/velox-connector/deps.yaml index 4e1cec2..c847e45 100644 --- a/taskfiles/velox-connector/deps.yaml +++ b/taskfiles/velox-connector/deps.yaml @@ -296,6 +296,7 @@ tasks: - "-DCMAKE_BUILD_TYPE=Release" - "-DCMAKE_INSTALL_MESSAGE=LAZY" - "-DBUILD_TESTING=OFF" + - "-DWITH_GTEST=OFF" - "-DWITH_UNWIND=OFF" CMAKE_PACKAGE_NAME: "{{.G_GLOG_LIB_NAME}}" CMAKE_SETTINGS_DIR: "{{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}" From 42052bd3b43d6094a6d27a517e1f4f79951adce4 Mon Sep 17 00:00:00 2001 From: Kirk Rodrigues <2454684+kirkrodrigues@users.noreply.github.com> Date: Tue, 7 Jul 2026 17:54:40 -0400 Subject: [PATCH 15/19] Style improvements. --- taskfiles/velox-connector/deps.yaml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/taskfiles/velox-connector/deps.yaml b/taskfiles/velox-connector/deps.yaml index c847e45..c860d47 100644 --- a/taskfiles/velox-connector/deps.yaml +++ b/taskfiles/velox-connector/deps.yaml @@ -190,8 +190,8 @@ tasks: CMAKE_PACKAGE_NAME: "{{.G_DOUBLE_CONVERSION_LIB_NAME}}" CMAKE_SETTINGS_DIR: "{{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}" TAR_SHA256: "a63ecb93182134ba4293fd5f22d6e08ca417caafa244afaa751cbfddf6415b13" - TAR_URL: "https://github.com/google/double-conversion/archive/refs/tags/\ - {{.VERSION}}.tar.gz" + TAR_URL: >- + https://github.com/google/double-conversion/archive/refs/tags/{{.VERSION}}.tar.gz WORK_DIR: "{{.G_DEPS_CPP_DIR}}" fast-float: @@ -247,6 +247,12 @@ tasks: - task: "yscope-dev-utils:cmake:install-remote-tar" vars: CMAKE_GEN_ARGS: + # Build and install args + - "-DCMAKE_BUILD_TYPE=Release" + - "-DCMAKE_INSTALL_MESSAGE=LAZY" + - "-DCMAKE_POLICY_DEFAULT_CMP0074=NEW" + + # Dependency args - "-C {{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}/{{.G_BOOST_LIB_NAME}}.cmake" - "-C {{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}/{{.G_FMT_LIB_NAME}}.cmake" - >- @@ -254,9 +260,6 @@ tasks: - "-DFastFloat_ROOT={{.G_DEPS_CPP_DIR}}/{{.G_FAST_FLOAT_LIB_NAME}}-install" - "-DGflags_ROOT={{.G_DEPS_CPP_DIR}}/{{.G_GFLAGS_LIB_NAME}}-install" - "-DGlog_ROOT={{.G_DEPS_CPP_DIR}}/{{.G_GLOG_LIB_NAME}}-install" - - "-DCMAKE_POLICY_DEFAULT_CMP0074=NEW" - - "-DCMAKE_BUILD_TYPE=Release" - - "-DCMAKE_INSTALL_MESSAGE=LAZY" CMAKE_PACKAGE_NAME: "folly" CMAKE_SETTINGS_DIR: "{{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}" TAR_SHA256: "31d05e867db6d4681989aca5f901079dbc33028e3139419fd5024b611689adea" @@ -291,13 +294,16 @@ tasks: - task: "yscope-dev-utils:cmake:install-remote-tar" vars: CMAKE_GEN_ARGS: - - "-C {{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}/{{.G_GFLAGS_LIB_NAME}}.cmake" + # Build and install args - "-DBUILD_SHARED_LIBS=OFF" + - "-DBUILD_TESTING=OFF" - "-DCMAKE_BUILD_TYPE=Release" - "-DCMAKE_INSTALL_MESSAGE=LAZY" - - "-DBUILD_TESTING=OFF" - "-DWITH_GTEST=OFF" - "-DWITH_UNWIND=OFF" + + # Dependency args + - "-C {{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}/{{.G_GFLAGS_LIB_NAME}}.cmake" CMAKE_PACKAGE_NAME: "{{.G_GLOG_LIB_NAME}}" CMAKE_SETTINGS_DIR: "{{.G_DEPS_CPP_CMAKE_SETTINGS_DIR}}" TAR_SHA256: "8a83bf982f37bb70825df71a9709fa90ea9f4447fb3c099e1d720a439d88bad6" From 474cf641a5f1bb4cf0de862293df9d7cfb0478be Mon Sep 17 00:00:00 2001 From: ChenXing Yang <60459812+20001020ycx@users.noreply.github.com> Date: Tue, 7 Jul 2026 18:03:47 -0400 Subject: [PATCH 16/19] Update velox-connector/CMakeLists.txt Co-authored-by: kirkrodrigues <2454684+kirkrodrigues@users.noreply.github.com> --- velox-connector/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/velox-connector/CMakeLists.txt b/velox-connector/CMakeLists.txt index 84a16ae..3aff736 100644 --- a/velox-connector/CMakeLists.txt +++ b/velox-connector/CMakeLists.txt @@ -49,8 +49,8 @@ include(FetchContent) set(PRESTO_GIT_TAG "" CACHE STRING "Presto commit that provides the Velox framework headers.") if(NOT PRESTO_GIT_TAG) message(FATAL_ERROR - "PRESTO_GIT_TAG is not set. Build via `task velox-connector:build`, or pass " - "`-DPRESTO_GIT_TAG=` when configuring CMake directly." + "PRESTO_GIT_TAG is not set. Build via `task velox-connector:build`, or set" + " PRESTO_GIT_TAG when configuring CMake directly." ) endif() From 0a76ff44ccc26ab6789a2a848e078ec668e60152 Mon Sep 17 00:00:00 2001 From: ChenXing Yang <60459812+20001020ycx@users.noreply.github.com> Date: Tue, 7 Jul 2026 18:03:57 -0400 Subject: [PATCH 17/19] Update velox-connector/CMakeLists.txt Co-authored-by: kirkrodrigues <2454684+kirkrodrigues@users.noreply.github.com> --- velox-connector/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/velox-connector/CMakeLists.txt b/velox-connector/CMakeLists.txt index 3aff736..107f258 100644 --- a/velox-connector/CMakeLists.txt +++ b/velox-connector/CMakeLists.txt @@ -47,7 +47,7 @@ include("${LIBCLP_PLUGIN_VELOX_CONNECTOR_DEPS_CMAKE_SETTINGS}") include(FetchContent) set(PRESTO_GIT_TAG "" CACHE STRING "Presto commit that provides the Velox framework headers.") -if(NOT PRESTO_GIT_TAG) +if(PRESTO_GIT_TAG STREQUAL "") message(FATAL_ERROR "PRESTO_GIT_TAG is not set. Build via `task velox-connector:build`, or set" " PRESTO_GIT_TAG when configuring CMake directly." From 1de951b8a21a3e30133b52b6ce0efcaa48b05173 Mon Sep 17 00:00:00 2001 From: ChenXing Yang <60459812+20001020ycx@users.noreply.github.com> Date: Tue, 7 Jul 2026 18:04:07 -0400 Subject: [PATCH 18/19] Update taskfiles/velox-connector/deps.yaml Co-authored-by: kirkrodrigues <2454684+kirkrodrigues@users.noreply.github.com> --- taskfiles/velox-connector/deps.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/taskfiles/velox-connector/deps.yaml b/taskfiles/velox-connector/deps.yaml index c860d47..1d3f951 100644 --- a/taskfiles/velox-connector/deps.yaml +++ b/taskfiles/velox-connector/deps.yaml @@ -24,7 +24,9 @@ vars: G_GSL_LIB_NAME: "Microsoft.GSL" G_YSTDLIB_LIB_NAME: "ystdlib" - # Velox header-dependency versions, kept in sync with the Velox bundled in `G_PRESTO_GIT_TAG`: + # Velox header-dependency versions + # + # NOTE: These must be kept in sync with the version of Velox used by presto@ G_DOUBLE_CONVERSION_VERSION: "v3.1.5" G_FAST_FLOAT_VERSION: "v8.0.2" G_FMT_VERSION: "11.2.0" From f48d222c9fbcb5ad7562e42ea5da255f608a4ac3 Mon Sep 17 00:00:00 2001 From: ChenXing Yang <60459812+20001020ycx@users.noreply.github.com> Date: Tue, 7 Jul 2026 18:04:16 -0400 Subject: [PATCH 19/19] Update taskfiles/velox-connector/deps.yaml Co-authored-by: kirkrodrigues <2454684+kirkrodrigues@users.noreply.github.com> --- taskfiles/velox-connector/deps.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/taskfiles/velox-connector/deps.yaml b/taskfiles/velox-connector/deps.yaml index 1d3f951..438fdd5 100644 --- a/taskfiles/velox-connector/deps.yaml +++ b/taskfiles/velox-connector/deps.yaml @@ -8,10 +8,8 @@ vars: # The Presto commit that the Velox connector is built against. # - # NOTE: This references the upstream OSS commit, contributed by YScope, that makes the plugin - # possible. This functionality isn't bundled with any Presto release yet. - # - # TODO: Update this to the `release-0.299` tag once it's available. + # NOTE: This reference is a commit that hasn't been included in a release yet, but contains the + # functionality necessary to implement the Velox connector. G_PRESTO_GIT_TAG: "6e1942b72a9f32191dcd0ba49812f2ac96a25615" # Library names (must match CMake package names for settings files)