Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .github/workflows/build_and_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ jobs:
- name: Install build and debugging dependencies
run: |
sudo apt-get update
sudo apt-get install -y gdb libcurl4-openssl-dev libssl-dev patchutils
sudo apt-get install -y gdb libcurl4-openssl-dev libssl-dev libclang-dev patchutils
- name: Install and verify regression compiler
if: matrix.gcc_version
shell: bash
Expand All @@ -140,9 +140,6 @@ jobs:
"${CXX}" --version
test "$("${CC}" -dumpfullversion)" = "${EXPECTED_GCC_VERSION}"
test "$("${CXX}" -dumpfullversion)" = "${EXPECTED_GCC_VERSION}"
- name: Install flatc and libclang (Vortex)
shell: bash
run: ci/scripts/setup_flatc.sh
- name: Build Paimon
shell: bash
env:
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/gcc8_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
printf '%s\n' 'Acquire::https::CaInfo "/etc/apt/runner-ca-certificates.crt";' \
'Acquire::Retries "3";' > /etc/apt/apt.conf.d/80-ci-downloads
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y gcc-8 g++-8 ninja-build git tar curl libcurl4-openssl-dev libssl-dev tzdata zip unzip pkg-config build-essential python3-dev gdb sudo patchutils
DEBIAN_FRONTEND=noninteractive apt-get install -y gcc-8 g++-8 ninja-build git tar curl libcurl4-openssl-dev libssl-dev tzdata zip unzip pkg-config build-essential python3-dev gdb sudo libclang-dev patchutils
curl -L -O https://github.com/Kitware/CMake/releases/download/v3.28.3/cmake-3.28.3-linux-x86_64.tar.gz
tar -zxvf cmake-3.28.3-linux-x86_64.tar.gz -C /usr/local --strip-components=1
rm cmake-3.28.3-linux-x86_64.tar.gz
Expand All @@ -77,9 +77,6 @@ jobs:
uses: ./.github/actions/setup-ccache
with:
cache-key-prefix: ccache-gcc8-test
- name: Install flatc and libclang (Vortex)
shell: bash
run: ci/scripts/setup_flatc.sh
- name: Build Paimon
shell: bash
env:
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/release_candidate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,10 @@ jobs:
shell: bash
run: ci/scripts/setup_rust.sh

- name: Install flatc and libclang (Vortex)
shell: bash
run: ci/scripts/setup_flatc.sh

- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev libssl-dev patchutils
sudo apt-get install -y libcurl4-openssl-dev libssl-dev libclang-dev patchutils

- name: Verify, build, test, and install
shell: bash
Expand Down
5 changes: 3 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -434,11 +434,12 @@ License: https://www.apache.org/licenses/LICENSE-2.0

--------------------------------------------------------------------------------

This product includes code from Vortex 0.75.0.
This product includes code from Vortex.

* Callback I/O sink utilities in crates/vortex_callback_io/callback_io.rs
(adapted from vortex-ffi/src/sink.rs)
* Upstream source patch in cmake_modules/vortex.diff
* Upstream source patches in cmake_modules/vortex.diff and
cmake_modules/vortex-0.93.0-enable-edition.diff

Copyright the Vortex contributors
Home page: https://github.com/vortex-data/vortex
Expand Down
76 changes: 0 additions & 76 deletions ci/scripts/setup_flatc.sh

This file was deleted.

13 changes: 5 additions & 8 deletions ci/scripts/setup_rust.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
set -eux

RUSTUP_VERSION=${RUSTUP_VERSION:-1.29.0}
# 1.90.0 is the minimum required by paimon-full-text 0.1.0 (rust-version in its Cargo.toml).
RUST_VERSION=${RUST_VERSION:-1.90.0}
RUST_VERSION=1.100.0
CBINDGEN_VERSION=${CBINDGEN_VERSION:-0.29.2}
PROTOC_VERSION=27.4

Expand All @@ -43,7 +42,10 @@ echo "${HOME}/.cargo/bin" >> "${GITHUB_PATH:-/dev/null}" || true

rustup toolchain install "${RUST_VERSION}" --profile minimal
rustup default "${RUST_VERSION}"
rustup component add rustfmt clippy
rustup component add --toolchain "${RUST_VERSION}" rustfmt clippy

export RUSTUP_TOOLCHAIN="${RUST_VERSION}" RUSTUP_AUTO_INSTALL=0
printf 'RUSTUP_TOOLCHAIN=%s\nRUSTUP_AUTO_INSTALL=0\n' "${RUST_VERSION}" >> "${GITHUB_ENV:-/dev/null}"

# Lance's protobuf definitions use proto3 optional fields, which require protoc >= 3.12.
if ! command -v protoc >/dev/null 2>&1 || \
Expand Down Expand Up @@ -75,11 +77,6 @@ if ! command -v protoc >/dev/null 2>&1 || \
echo "${protoc_home}/bin" >> "${GITHUB_PATH:-/dev/null}" || true
fi

# Vortex's FFI build pins rust-version >= 1.95 and is invoked with RUSTUP_TOOLCHAIN=stable (see
# cmake_modules/ThirdpartyToolchain.cmake). Install the stable channel alongside the pinned default
# so Vortex builds with it while Lance, Mosaic and tantivy-fts keep using the default toolchain.
rustup toolchain install stable --profile minimal

# cbindgen is used by the crate's build.rs to emit the C header that the
# C++ side includes. Corrosion will also run cbindgen at CMake configure
# time; both paths need it available.
Expand Down
23 changes: 6 additions & 17 deletions cmake_modules/CorrosionFetch.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,31 +36,20 @@ set(PAIMON_CORROSION_REPO
# Help Corrosion find rustc/cargo when CMake is invoked without a login shell
# or when rustup is installed to a non-default location. We try, in order:
# 1. Existing Rust_COMPILER cache variable (user override)
# 2. $CARGO_HOME/bin/rustc (when env var set)
# 3. $HOME/.cargo/bin/rustc (rustup's default install)
# 4. Fallback: let Corrosion's FindRust.cmake try its own detection
function(_paimon_find_rustup_bin _var _name)
if(DEFINED ENV{CARGO_HOME} AND EXISTS "$ENV{CARGO_HOME}/bin/${_name}")
set(${_var}
"$ENV{CARGO_HOME}/bin/${_name}"
PARENT_SCOPE)
elseif(DEFINED ENV{HOME} AND EXISTS "$ENV{HOME}/.cargo/bin/${_name}")
set(${_var}
"$ENV{HOME}/.cargo/bin/${_name}"
PARENT_SCOPE)
endif()
endfunction()

# 2. rustc/cargo on PATH
# 3. $CARGO_HOME/bin or $HOME/.cargo/bin for non-login shells
if(NOT DEFINED Rust_COMPILER OR Rust_COMPILER STREQUAL "")
_paimon_find_rustup_bin(_rustc_path rustc)
find_program(_rustc_path rustc PATHS "$ENV{CARGO_HOME}/bin" "$ENV{HOME}/.cargo/bin"
NO_CACHE)
if(_rustc_path)
set(Rust_COMPILER
"${_rustc_path}"
CACHE FILEPATH "rustc")
endif()
endif()
if(NOT DEFINED Rust_CARGO OR Rust_CARGO STREQUAL "")
_paimon_find_rustup_bin(_cargo_path cargo)
find_program(_cargo_path cargo PATHS "$ENV{CARGO_HOME}/bin" "$ENV{HOME}/.cargo/bin"
NO_CACHE)
if(_cargo_path)
set(Rust_CARGO
"${_cargo_path}"
Expand Down
16 changes: 5 additions & 11 deletions cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1549,13 +1549,6 @@ endmacro()
macro(build_vortex)
message(STATUS "Building Vortex Rust FFI (static) from source")
find_program(PAIMON_CARGO_EXECUTABLE cargo REQUIRED)
# Vortex compiles FlatBuffers schemas at build time; flatc must match the flatbuffers crate
# version Vortex uses. Allow a FLATC env override, else require flatc on PATH.
if(DEFINED ENV{FLATC})
set(VORTEX_FLATC "$ENV{FLATC}")
else()
find_program(VORTEX_FLATC flatc REQUIRED)
endif()

set(VORTEX_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/vortex_ep-install")
set(VORTEX_INCLUDE_DIR "${VORTEX_PREFIX}/include")
Expand All @@ -1572,7 +1565,9 @@ macro(build_vortex)
# neither of which can go through paimon's filesystem. `callback_io.rs` adds an entry point
# backed by host callbacks; it is maintained in this repository and injected into the Vortex
# source tree. The patch declares the module.
set(VORTEX_PATCH_FILE "${CMAKE_CURRENT_LIST_DIR}/vortex.diff")
# The edition API must be available before applying the Paimon integration patch.
set(VORTEX_PATCH_FILES "${CMAKE_CURRENT_LIST_DIR}/vortex-0.93.0-enable-edition.diff"
"${CMAKE_CURRENT_LIST_DIR}/vortex.diff")
paimon_patch_command(vortex_ep PATCH_COMMAND)
set(VORTEX_CALLBACK_IO_SRC
"${CMAKE_SOURCE_DIR}/crates/vortex_callback_io/callback_io.rs")
Expand All @@ -1593,8 +1588,7 @@ macro(build_vortex)
"${VORTEX_CALLBACK_IO_SRC}"
"<SOURCE_DIR>/vortex-ffi/src/callback_io.rs"
COMMAND ${CMAKE_COMMAND} -E chdir <SOURCE_DIR> ${CMAKE_COMMAND} -E
env "FLATC=${VORTEX_FLATC}" "RUSTUP_TOOLCHAIN=stable"
"CC=${CMAKE_C_COMPILER}" "CXX=${CMAKE_CXX_COMPILER}"
env "CC=${CMAKE_C_COMPILER}" "CXX=${CMAKE_CXX_COMPILER}"
"CARGO_TARGET_DIR=<BINARY_DIR>"
"RUSTFLAGS=-Crelocation-model=pic"
${PAIMON_CARGO_EXECUTABLE} rustc --locked --package
Expand All @@ -1611,7 +1605,7 @@ macro(build_vortex)
VERSION
"${PAIMON_VORTEX_BUILD_VERSION}"
PATCHES
"${VORTEX_PATCH_FILE}"
${VORTEX_PATCH_FILES}
INPUTS
"${VORTEX_CALLBACK_IO_SRC}"
INSTALL_DIR
Expand Down
Loading
Loading