Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump kernel to 0.5.0 #127

Merged
merged 5 commits into from
Dec 5, 2024
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/CloudTesting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
sudo apt-get update -y -qq
sudo apt-get install -y -qq ninja-build make gcc-multilib g++-multilib zip unzip build-essential checkinstall curl libz-dev openssh-client

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'true'
Expand Down
36 changes: 20 additions & 16 deletions .github/workflows/LocalTesting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ jobs:
azurite-tests-linux:
name: Azurite (local azure test server) tests (Linux)
runs-on: ubuntu-latest
container: 'quay.io/pypa/manylinux2014_x86_64'
env:
VCPKG_TARGET_TRIPLET: 'x64-linux'
GEN: Ninja
Expand All @@ -24,32 +23,37 @@ jobs:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'true'

- name: Install Ninja
shell: bash
run: sudo apt-get update -y -qq && sudo apt-get install -y -qq ninja-build

- name: Setup Ccache
uses: hendrikmuhs/ccache-action@main
with:
key: ${{ github.job }}

- name: Setup vcpkg
uses: lukka/[email protected]
with:
vcpkgGitCommitId: a1a1cbc975abf909a6c8985a6a2b8fe20bbd9bd6

- uses: actions/setup-node@v4

- name: install Azure test service
run: |
yum install -y nodejs npm
npm install -g azurite
echo -e "[azure-cli]\nname=Azure CLI\nbaseurl=https://packages.microsoft.com/yumrepos/azure-cli\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" | tee /etc/yum.repos.d/azure-cli.repo
yum install -y azure-cli

- name: Setup ManyLinux2014
run: |
./duckdb/scripts/setup_manylinux2014.sh general aws-cli ccache ssh python_alias openssl
sudo apt-get install -y azure-cli

- name: Setup Rust for manylinux (dtolnay/rust-toolchain doesn't work due to curl being old here)
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
echo "$HOME/.cargo/bin" >> $GITHUB_PATH

- name: Setup vcpkg
uses: lukka/[email protected]
with:
vcpkgGitCommitId: a1a1cbc975abf909a6c8985a6a2b8fe20bbd9bd6

- name: Handle OpenSSL dependency for rust build
run: |
echo "OPENSSL_ROOT_DIR=`pwd`/build/release/vcpkg_installed/x64-linux" >> $GITHUB_ENV
Expand Down Expand Up @@ -90,7 +94,7 @@ jobs:
VCPKG_TOOLCHAIN_PATH: ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'true'
Expand Down Expand Up @@ -179,7 +183,7 @@ jobs:
VCPKG_TOOLCHAIN_PATH: ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'true'
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
# the c++ headers. Currently, when bumping the kernel version, the produced
# header in ./src/include/delta_kernel_ffi.hpp should be also bumped, applying
# the fix
GIT_TAG v0.4.0
GIT_TAG v0.5.0
# Prints the env variables passed to the cargo build to the terminal, useful
# in debugging because passing them through CMake is an error-prone mess
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E env ${RUST_UNSET_ENV_VARS}
Expand Down Expand Up @@ -178,7 +178,7 @@
# Hides annoying linker warnings
set(CMAKE_OSX_DEPLOYMENT_TARGET
13.3
CACHE STRING "Minimum OS X deployment version" FORCE)

Check warning on line 181 in CMakeLists.txt

View workflow job for this annotation

GitHub Actions / Build extension binaries / MacOS (osx_amd64, x86_64, x64-osx)

Not disabling vptr sanitizer on M1 Macbook - set DISABLE_VPTR_SANITIZER

Check warning on line 181 in CMakeLists.txt

View workflow job for this annotation

GitHub Actions / Build extension binaries / MacOS (osx_arm64, arm64, arm64-osx)

Not disabling vptr sanitizer on M1 Macbook - set DISABLE_VPTR_SANITIZER

# Add the default client
add_compile_definitions(DEFINE_DEFAULT_ENGINE)
Expand Down
69 changes: 40 additions & 29 deletions src/delta_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,37 +107,48 @@ ffi::EngineError *DuckDBEngineError::AllocateError(ffi::KernelError etype, ffi::
string DuckDBEngineError::KernelErrorEnumToString(ffi::KernelError err) {
const char *KERNEL_ERROR_ENUM_STRINGS[] = {
"UnknownError",
"FFIError",
"ArrowError",
"EngineDataTypeError",
"ExtractError",
"GenericError",
"IOErrorError",
"ParquetError",
"ObjectStoreError",
"ObjectStorePathError",
"Reqwest",
"FileNotFoundError",
"MissingColumnError",
"UnexpectedColumnTypeError",
"MissingDataError",
"MissingVersionError",
"DeletionVectorError",
"InvalidUrlError",
"MalformedJsonError",
"MissingMetadataError",
"MissingProtocolError",
"MissingMetadataAndProtocolError",
"ParseError",
"JoinFailureError",
"Utf8Error",
"ParseIntError",
"InvalidColumnMappingMode",
"InvalidTableLocation",
"InvalidDecimalError",
"FFIError",
"ArrowError",
"EngineDataTypeError",
"ExtractError",
"GenericError",
"IOErrorError",
"ParquetError",
"ObjectStoreError",
"ObjectStorePathError",
"ReqwestError",
"FileNotFoundError",
"MissingColumnError",
"UnexpectedColumnTypeError",
"MissingDataError",
"MissingVersionError",
"DeletionVectorError",
"InvalidUrlError",
"MalformedJsonError",
"MissingMetadataError",
"MissingProtocolError",
"InvalidProtocolError",
"MissingMetadataAndProtocolError",
"ParseError",
"JoinFailureError",
"Utf8Error",
"ParseIntError",
"InvalidColumnMappingModeError",
"InvalidTableLocationError",
"InvalidDecimalError",
"InvalidStructDataError",
"InternalError",
"InvalidExpression",
"InvalidLogPath",
"InvalidCommitInfo",
"FileAlreadyExists",
"MissingCommitInfo",
"UnsupportedError",
"ParseIntervalError",
"ChangeDataFeedUnsupported"
};

static_assert(sizeof(KERNEL_ERROR_ENUM_STRINGS) / sizeof(char *) - 1 == (int)ffi::KernelError::InvalidDecimalError,
static_assert(sizeof(KERNEL_ERROR_ENUM_STRINGS) / sizeof(char *) - 1 == (int)ffi::KernelError::ChangeDataFeedUnsupported,
"KernelErrorEnumStrings mismatched with kernel");

if ((int)err < sizeof(KERNEL_ERROR_ENUM_STRINGS) / sizeof(char *)) {
Expand Down
Loading
Loading