diff --git a/.github/regression/micro.csv b/.github/regression/micro.csv new file mode 100644 index 0000000..2a4ef0f --- /dev/null +++ b/.github/regression/micro.csv @@ -0,0 +1,5 @@ +benchmark/micro/snapshot_performance/delta_scan.benchmark +benchmark/micro/snapshot_performance/snapshot_no_pin.benchmark +benchmark/micro/snapshot_performance/snapshot_no_pin_filter.benchmark +benchmark/micro/snapshot_performance/snapshot_pin.benchmark +benchmark/micro/snapshot_performance/snapshot_pin_filter.benchmark \ No newline at end of file diff --git a/.github/workflows/CloudTesting.yml b/.github/workflows/CloudTesting.yml index 93c627a..593694e 100644 --- a/.github/workflows/CloudTesting.yml +++ b/.github/workflows/CloudTesting.yml @@ -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' diff --git a/.github/workflows/LocalTesting.yml b/.github/workflows/LocalTesting.yml index 7735508..5c425b8 100644 --- a/.github/workflows/LocalTesting.yml +++ b/.github/workflows/LocalTesting.yml @@ -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 @@ -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/run-vcpkg@v11.1 + 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/run-vcpkg@v11.1 - with: - vcpkgGitCommitId: a1a1cbc975abf909a6c8985a6a2b8fe20bbd9bd6 - - name: Handle OpenSSL dependency for rust build run: | echo "OPENSSL_ROOT_DIR=`pwd`/build/release/vcpkg_installed/x64-linux" >> $GITHUB_ENV @@ -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' @@ -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' @@ -210,12 +214,14 @@ jobs: - name: Build shell: bash - run: make generate-data + run: | + make generate-data + make release - name: Test shell: bash run: | - GENERATED_DATA_AVAILABLE=1 make test + GENERATED_DATA_AVAILABLE=1 make test_release regression-test-benchmark-runner: name: Performance Regression Tests @@ -280,13 +286,20 @@ jobs: if: always() shell: bash run: | - python3 ./duckdb/scripts/regression_test_runner.py --old=duckdb_delta/build/release/benchmark/benchmark_runner --new=build/release/benchmark/benchmark_runner --benchmarks=.github/regression/tpch_sf1_local.csv --verbose --threads=2 --root-dir=. + python3 ./duckdb/scripts/regression/test_runner.py --old=duckdb_delta/build/release/benchmark/benchmark_runner --new=build/release/benchmark/benchmark_runner --benchmarks=.github/regression/tpch_sf1_local.csv --verbose --threads=2 --root-dir=. - name: Regression Test TPC-DS if: always() shell: bash run: | - python ./duckdb/scripts/regression_test_runner.py --old=duckdb_delta/build/release/benchmark/benchmark_runner --new=build/release/benchmark/benchmark_runner --benchmarks=.github/regression/tpcds_sf1_local.csv --verbose --threads=2 --root-dir=. + python ./duckdb/scripts/regression/test_runner.py --old=duckdb_delta/build/release/benchmark/benchmark_runner --new=build/release/benchmark/benchmark_runner --benchmarks=.github/regression/tpcds_sf1_local.csv --verbose --threads=2 --root-dir=. + + # FIXME: re-enable +# - name: Regression Test Micro +# if: always() +# shell: bash +# run: | +# python ./duckdb/scripts/regression/test_runner.py --old=duckdb_delta/build/release/benchmark/benchmark_runner --new=build/release/benchmark/benchmark_runner --benchmarks=.github/regression/micro.csv --verbose --threads=2 --root-dir=. - name: Test benchmark makefile shell: bash diff --git a/.github/workflows/MainDistributionPipeline.yml b/.github/workflows/MainDistributionPipeline.yml index 0fd14ac..45d26e7 100644 --- a/.github/workflows/MainDistributionPipeline.yml +++ b/.github/workflows/MainDistributionPipeline.yml @@ -14,21 +14,22 @@ concurrency: jobs: duckdb-stable-build: name: Build extension binaries - uses: duckdb/extension-ci-tools/.github/workflows/_extension_distribution.yml@v1.1.3 + uses: duckdb/extension-ci-tools/.github/workflows/_extension_distribution.yml@main with: - duckdb_version: v1.1.3 - ci_tools_version: v1.1.3 + duckdb_version: main + ci_tools_version: main extension_name: delta enable_rust: true - exclude_archs: 'wasm_mvp;wasm_eh;wasm_threads;windows_amd64_rtools' + exclude_archs: 'wasm_mvp;wasm_eh;wasm_threads;windows_amd64_rtools;windows_amd64_mingw;linux_amd64_musl' + extra_toolchains: 'python3' duckdb-stable-deploy: name: Deploy extension binaries needs: duckdb-stable-build - uses: duckdb/extension-ci-tools/.github/workflows/_extension_deploy.yml@v1.1.3 + uses: duckdb/extension-ci-tools/.github/workflows/_extension_deploy.yml@main secrets: inherit with: extension_name: delta - duckdb_version: v1.1.3 - exclude_archs: 'wasm_mvp;wasm_eh;wasm_threads;windows_amd64_rtools' - deploy_latest: ${{ startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' }} + duckdb_version: main + ci_tools_version: main + exclude_archs: 'wasm_mvp;wasm_eh;wasm_threads;windows_amd64_rtools;windows_amd64_mingw;linux_amd64_musl' diff --git a/.gitignore b/.gitignore index bc1caa6..e9e3e7f 100644 --- a/.gitignore +++ b/.gitignore @@ -11,5 +11,5 @@ test/python/__pycache__/ data/generated __azurite*__.json __blobstorage__ -.venv +venv .vscode \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index bac8c32..65c13ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 2.8.12) include(ExternalProject) -### Core config +# Core config set(TARGET_NAME delta) set(EXTENSION_NAME ${TARGET_NAME}_extension) @@ -12,24 +12,45 @@ project(${TARGET_NAME}) include_directories(src/include) set(EXTENSION_SOURCES - src/delta_extension.cpp - src/delta_functions.cpp - src/delta_utils.cpp - src/functions/delta_scan.cpp) - -### Custom config -# TODO: figure out if we really need this? + src/delta_extension.cpp + src/delta_functions.cpp + src/delta_utils.cpp + src/functions/delta_scan.cpp + src/functions/expression_functions.cpp + src/storage/delta_catalog.cpp + src/storage/delta_schema_entry.cpp + src/storage/delta_table_entry.cpp + src/storage/delta_transaction.cpp + src/storage/delta_transaction_manager.cpp) + +# Custom config TODO: figure out if we really need this? if(APPLE) - set(PLATFORM_LIBS m c System resolv "-framework Corefoundation -framework SystemConfiguration -framework Security") + set(PLATFORM_LIBS + m + c + System + resolv + "-framework Corefoundation -framework SystemConfiguration -framework Security" + ) elseif(UNIX) - set(PLATFORM_LIBS m c resolv) + set(PLATFORM_LIBS m c resolv) elseif(WIN32) - set(PLATFORM_LIBS ntdll ncrypt secur32 ws2_32 userenv bcrypt msvcrt advapi32 RuntimeObject) + set(PLATFORM_LIBS + ntdll + crypt32 + ncrypt + secur32 + ws2_32 + userenv + bcrypt + msvcrt + advapi32 + RuntimeObject) else() - message(STATUS "UNKNOWN OS") + message(STATUS "UNKNOWN OS") endif() -### Setup delta-kernel-rs dependency +# Setup delta-kernel-rs dependency set(KERNEL_NAME delta_kernel) # Set default ExternalProject root directory @@ -40,40 +61,50 @@ set(RUST_ENV_VARS "") # Propagate arch to rust build for CI set(RUST_PLATFORM_TARGET "") if("${OS_NAME}" STREQUAL "linux") - if ("${OS_ARCH}" STREQUAL "arm64") - set(RUST_PLATFORM_TARGET "aarch64-unknown-linux-gnu") - elseif("${CMAKE_CXX_COMPILER}" MATCHES "aarch64") - set(RUST_ENV_VARS ${RUST_ENV_VARS} CFLAGS_aarch64_unknown_linux_gnu=--sysroot=/usr/aarch64-linux-gnu) - set(RUST_ENV_VARS ${RUST_ENV_VARS} CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc) - set(RUST_ENV_VARS ${RUST_ENV_VARS} OPENSSL_LIB_DIR=${CMAKE_BINARY_DIR}/vcpkg_installed/${VCPKG_TARGET_TRIPLET}/lib) - set(RUST_ENV_VARS ${RUST_ENV_VARS} OPENSSL_INCLUDE_DIR=${CMAKE_BINARY_DIR}/vcpkg_installed/${VCPKG_TARGET_TRIPLET}/include) - set(RUST_PLATFORM_TARGET "aarch64-unknown-linux-gnu") - else() - set(RUST_PLATFORM_TARGET "x86_64-unknown-linux-gnu") - endif() + if("${OS_ARCH}" STREQUAL "arm64") + set(RUST_PLATFORM_TARGET "aarch64-unknown-linux-gnu") + elseif("${CMAKE_CXX_COMPILER}" MATCHES "aarch64") + set(RUST_ENV_VARS + ${RUST_ENV_VARS} + CFLAGS_aarch64_unknown_linux_gnu=--sysroot=/usr/aarch64-linux-gnu) + set(RUST_ENV_VARS + ${RUST_ENV_VARS} + CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc) + set(RUST_ENV_VARS + ${RUST_ENV_VARS} + OPENSSL_LIB_DIR=${CMAKE_BINARY_DIR}/vcpkg_installed/${VCPKG_TARGET_TRIPLET}/lib + ) + set(RUST_ENV_VARS + ${RUST_ENV_VARS} + OPENSSL_INCLUDE_DIR=${CMAKE_BINARY_DIR}/vcpkg_installed/${VCPKG_TARGET_TRIPLET}/include + ) + set(RUST_PLATFORM_TARGET "aarch64-unknown-linux-gnu") + else() + set(RUST_PLATFORM_TARGET "x86_64-unknown-linux-gnu") + endif() elseif("${OS_NAME}" STREQUAL "osx") - if ("${OSX_BUILD_ARCH}" STREQUAL "arm64") - set(RUST_PLATFORM_TARGET "aarch64-apple-darwin") - elseif ("${OSX_BUILD_ARCH}" STREQUAL "x86_64") - set(RUST_PLATFORM_TARGET "x86_64-apple-darwin") - elseif ("${OS_ARCH}" STREQUAL "arm64") - set(RUST_PLATFORM_TARGET "aarch64-apple-darwin") - endif() + if("${OSX_BUILD_ARCH}" STREQUAL "arm64") + set(RUST_PLATFORM_TARGET "aarch64-apple-darwin") + elseif("${OSX_BUILD_ARCH}" STREQUAL "x86_64") + set(RUST_PLATFORM_TARGET "x86_64-apple-darwin") + elseif("${OS_ARCH}" STREQUAL "arm64") + set(RUST_PLATFORM_TARGET "aarch64-apple-darwin") + endif() elseif(WIN32) - if (MINGW AND "${OS_ARCH}" STREQUAL "arm64") - set(RUST_PLATFORM_TARGET "aarch64-pc-windows-gnu") - elseif (MINGW AND "${OS_ARCH}" STREQUAL "amd64") - set(RUST_PLATFORM_TARGET "x86_64-pc-windows-gnu") - elseif (MSVC AND "${OS_ARCH}" STREQUAL "arm64") - set(RUST_PLATFORM_TARGET "aarch64-pc-windows-msvc") - elseif (MSVC AND "${OS_ARCH}" STREQUAL "amd64") - set(RUST_PLATFORM_TARGET "x86_64-pc-windows-msvc") - endif() + if(MINGW AND "${OS_ARCH}" STREQUAL "arm64") + set(RUST_PLATFORM_TARGET "aarch64-pc-windows-gnu") + elseif(MINGW AND "${OS_ARCH}" STREQUAL "amd64") + set(RUST_PLATFORM_TARGET "x86_64-pc-windows-gnu") + elseif(MSVC AND "${OS_ARCH}" STREQUAL "arm64") + set(RUST_PLATFORM_TARGET "aarch64-pc-windows-msvc") + elseif(MSVC AND "${OS_ARCH}" STREQUAL "amd64") + set(RUST_PLATFORM_TARGET "x86_64-pc-windows-msvc") + endif() endif() # We currently only support the predefined targets. -if ("${RUST_PLATFORM_TARGET}" STREQUAL "") - message(FATAL_ERROR "Failed to detect the correct platform") +if("${RUST_PLATFORM_TARGET}" STREQUAL "") + message(FATAL_ERROR "Failed to detect the correct platform") endif() set(RUST_PLATFORM_PARAM "--target=${RUST_PLATFORM_TARGET}") @@ -86,69 +117,74 @@ string(STRIP "${RUST_ENV_VARS}" RUST_ENV_VARS) set(RUST_UNSET_ENV_VARS --unset=CC --unset=CXX --unset=LD) # Define all the relevant delta-kernel-rs paths/names -set(DELTA_KERNEL_LIBNAME "${CMAKE_STATIC_LIBRARY_PREFIX}delta_kernel_ffi${CMAKE_STATIC_LIBRARY_SUFFIX}") -set(DELTA_KERNEL_LIBPATH_DEBUG "${CMAKE_BINARY_DIR}/rust/src/delta_kernel/target/${RUST_PLATFORM_TARGET}/debug/${DELTA_KERNEL_LIBNAME}") -set(DELTA_KERNEL_LIBPATH_RELEASE "${CMAKE_BINARY_DIR}/rust/src/delta_kernel/target/${RUST_PLATFORM_TARGET}/release/${DELTA_KERNEL_LIBNAME}") -set(DELTA_KERNEL_FFI_HEADER_PATH "${CMAKE_BINARY_DIR}/rust/src/delta_kernel/target/ffi-headers") -set(DELTA_KERNEL_FFI_HEADER_C "${CMAKE_BINARY_DIR}/rust/src/delta_kernel/target/ffi-headers/delta_kernel_ffi.h") -set(DELTA_KERNEL_FFI_HEADER_CXX "${CMAKE_BINARY_DIR}/rust/src/delta_kernel/target/ffi-headers/delta_kernel_ffi.hpp") +set(DELTA_KERNEL_LIBNAME + "${CMAKE_STATIC_LIBRARY_PREFIX}delta_kernel_ffi${CMAKE_STATIC_LIBRARY_SUFFIX}" +) +set(DELTA_KERNEL_LIBPATH + "${CMAKE_BINARY_DIR}/rust/src/delta_kernel/target/${RUST_PLATFORM_TARGET}/$,debug,release>/${DELTA_KERNEL_LIBNAME}" +) +set(DELTA_KERNEL_FFI_HEADER_PATH + "${CMAKE_BINARY_DIR}/rust/src/delta_kernel/target/ffi-headers") +set(DELTA_KERNEL_FFI_HEADER_C + "${CMAKE_BINARY_DIR}/rust/src/delta_kernel/target/ffi-headers/delta_kernel_ffi.h" +) +set(DELTA_KERNEL_FFI_HEADER_CXX + "${CMAKE_BINARY_DIR}/rust/src/delta_kernel/target/ffi-headers/delta_kernel_ffi.hpp" +) # Add rust_example as a CMake target ExternalProject_Add( - ${KERNEL_NAME} - GIT_REPOSITORY "https://github.com/delta-incubator/delta-kernel-rs" - # WARNING: the FFI headers are currently pinned due to the C linkage issue of 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 - # 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} ${RUST_ENV_VARS} env - UPDATE_COMMAND "" - BUILD_IN_SOURCE 1 - # Build debug build - BUILD_COMMAND - ${CMAKE_COMMAND} -E env ${RUST_UNSET_ENV_VARS} ${RUST_ENV_VARS} - cargo build --package delta_kernel_ffi --workspace --all-features ${RUST_PLATFORM_PARAM} - # Build release build - COMMAND - ${CMAKE_COMMAND} -E env ${RUST_UNSET_ENV_VARS} ${RUST_ENV_VARS} - cargo build --package delta_kernel_ffi --workspace --all-features --release ${RUST_PLATFORM_PARAM} - # Build DATs - COMMAND - ${CMAKE_COMMAND} -E env ${RUST_UNSET_ENV_VARS} ${RUST_ENV_VARS} - cargo build --manifest-path=${CMAKE_BINARY_DIR}/rust/src/delta_kernel/acceptance/Cargo.toml - # Define the byproducts, required for building with Ninja - BUILD_BYPRODUCTS "${DELTA_KERNEL_LIBPATH_DEBUG}" - BUILD_BYPRODUCTS "${DELTA_KERNEL_LIBPATH_RELEASE}" - BUILD_BYPRODUCTS "${DELTA_KERNEL_FFI_HEADER_C}" - BUILD_BYPRODUCTS "${DELTA_KERNEL_FFI_HEADER_CXX}" - INSTALL_COMMAND "" - LOG_BUILD ON) + ${KERNEL_NAME} + GIT_REPOSITORY "https://github.com/delta-incubator/delta-kernel-rs" + # WARNING: the FFI headers are currently pinned due to the C linkage issue of + # 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.6.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} + ${RUST_ENV_VARS} env + UPDATE_COMMAND "" + BUILD_IN_SOURCE 1 + # Build debug build + BUILD_COMMAND + ${CMAKE_COMMAND} -E env ${RUST_UNSET_ENV_VARS} ${RUST_ENV_VARS} cargo build + --package delta_kernel_ffi --workspace $<$:--release> + --all-features ${RUST_PLATFORM_PARAM} + # Build DATs + COMMAND + ${CMAKE_COMMAND} -E env ${RUST_UNSET_ENV_VARS} ${RUST_ENV_VARS} cargo build + --manifest-path=${CMAKE_BINARY_DIR}/rust/src/delta_kernel/acceptance/Cargo.toml + # Define the byproducts, required for building with Ninja + BUILD_BYPRODUCTS "${DELTA_KERNEL_LIBPATH}" + BUILD_BYPRODUCTS "${DELTA_KERNEL_FFI_HEADER_C}" + BUILD_BYPRODUCTS "${DELTA_KERNEL_FFI_HEADER_CXX}" + INSTALL_COMMAND "" + LOG_BUILD ON) build_static_extension(${TARGET_NAME} ${EXTENSION_SOURCES}) build_loadable_extension(${TARGET_NAME} " " ${EXTENSION_SOURCES}) -# TODO: when C linkage issue is resolved, we should switch back to using the generated headers -#include_directories(${DELTA_KERNEL_FFI_HEADER_PATH}) +# TODO: when C linkage issue is resolved, we should switch back to using the +# generated headers include_directories(${DELTA_KERNEL_FFI_HEADER_PATH}) # Hides annoying linker warnings -set(CMAKE_OSX_DEPLOYMENT_TARGET 13.3 CACHE STRING "Minimum OS X deployment version" FORCE) +set(CMAKE_OSX_DEPLOYMENT_TARGET + 13.3 + CACHE STRING "Minimum OS X deployment version" FORCE) # Add the default client add_compile_definitions(DEFINE_DEFAULT_ENGINE) # Link delta-kernal-rs to static lib -target_link_libraries(${EXTENSION_NAME} - debug ${DELTA_KERNEL_LIBPATH_DEBUG} - optimized ${DELTA_KERNEL_LIBPATH_RELEASE} - ${PLATFORM_LIBS}) +target_link_libraries(${EXTENSION_NAME} ${DELTA_KERNEL_LIBPATH} + ${PLATFORM_LIBS}) add_dependencies(${EXTENSION_NAME} delta_kernel) # Link delta-kernal-rs to dynamic lib -target_link_libraries(${LOADABLE_EXTENSION_NAME} - debug ${DELTA_KERNEL_LIBPATH_DEBUG} - optimized ${DELTA_KERNEL_LIBPATH_RELEASE} - ${PLATFORM_LIBS}) +target_link_libraries(${LOADABLE_EXTENSION_NAME} ${DELTA_KERNEL_LIBPATH} + ${PLATFORM_LIBS}) add_dependencies(${LOADABLE_EXTENSION_NAME} delta_kernel) install( diff --git a/Makefile b/Makefile index 8cc8bc9..7eb8376 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,14 @@ PROJ_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) EXT_NAME=deltatable EXT_CONFIG=${PROJ_DIR}extension_config.cmake +ifeq ($(SANITIZER_MODE), thread) + EXT_DEBUG_FLAGS:=-DENABLE_THREAD_SANITIZER=1 +endif + +ifneq ("${CUSTOM_LINKER}", "") + EXT_DEBUG_FLAGS:=${EXT_DEBUG_FLAGS} -DCUSTOM_LINKER=${CUSTOM_LINKER} +endif + # Set test paths test_release: export DELTA_KERNEL_TESTS_PATH=./build/release/rust/src/delta_kernel/kernel/tests/data test_release: export DAT_PATH=./build/release/rust/src/delta_kernel/acceptance/tests/dat diff --git a/benchmark/benchmark.Makefile b/benchmark/benchmark.Makefile index fc59109..3e3bf9c 100644 --- a/benchmark/benchmark.Makefile +++ b/benchmark/benchmark.Makefile @@ -26,6 +26,8 @@ plot: # TPCH SF1 on delta table bench-run-tpch-sf1-delta: bench-output-dir ./build/release/benchmark/benchmark_runner --root-dir './' 'benchmark/tpch/sf1/local/delta/$(BENCHMARK_PATTERN)' 2>&1 | tee benchmark_results/tpch-sf1-delta.csv +bench-run-tpch-sf1-delta-attach: bench-output-dir + ./build/release/benchmark/benchmark_runner --root-dir './' 'benchmark/tpch/sf1/local/delta_attach/$(BENCHMARK_PATTERN)' 2>&1 | tee benchmark_results/tpch-sf1-delta-attach.csv # TPCH SF1 on parquet files bench-run-tpch-sf1-parquet: bench-output-dir ./build/release/benchmark/benchmark_runner 'benchmark/tpch/sf1-parquet/$(BENCHMARK_PATTERN)' 2>&1 | tee benchmark_results/tpch-sf1-parquet.csv @@ -33,7 +35,7 @@ bench-run-tpch-sf1-parquet: bench-output-dir bench-run-tpch-sf1-duckdb: bench-output-dir ./build/release/benchmark/benchmark_runner --root-dir './' 'benchmark/tpch/sf1/local/duckdb/$(BENCHMARK_PATTERN)' 2>&1 | tee benchmark_results/tpch-sf1-duckdb.csv # COMPARES TPCH SF1 on parquet file vs on delta files vs on duckdb files -bench-run-tpch-sf1: bench-run-tpch-sf1-delta bench-run-tpch-sf1-parquet +bench-run-tpch-sf1: bench-run-tpch-sf1-delta bench-run-tpch-sf1-parquet bench-run-tpch-sf1-delta-attach ### # TPCDS @@ -42,6 +44,10 @@ bench-run-tpch-sf1: bench-run-tpch-sf1-delta bench-run-tpch-sf1-parquet # TPCDS SF1 on delta table bench-run-tpcds-sf1-delta: bench-output-dir ./build/release/benchmark/benchmark_runner --root-dir './' 'benchmark/tpcds/sf1/$(IO_MODE)/delta/$(BENCHMARK_PATTERN)' 2>&1 | tee benchmark_results/tpcds-sf1-delta-$(IO_MODE).csv +bench-run-tpcds-sf1-delta-attach: bench-output-dir + ./build/release/benchmark/benchmark_runner --root-dir './' 'benchmark/tpcds/sf1/$(IO_MODE)/delta_attach/$(BENCHMARK_PATTERN)' 2>&1 | tee benchmark_results/tpcds-sf1-delta-attach-$(IO_MODE).csv +bench-run-tpcds-sf1-delta-attach-pin: bench-output-dir + ./build/release/benchmark/benchmark_runner --root-dir './' 'benchmark/tpcds/sf1/$(IO_MODE)/delta_attach_pin/$(BENCHMARK_PATTERN)' 2>&1 | tee benchmark_results/tpcds-sf1-delta-attach-pin-$(IO_MODE).csv # TPCDS SF1 on parquet files bench-run-tpcds-sf1-parquet: bench-output-dir ./build/release/benchmark/benchmark_runner --root-dir './' 'benchmark/tpcds/sf1/$(IO_MODE)/parquet/$(BENCHMARK_PATTERN)' 2>&1 | tee benchmark_results/tpcds-sf1-parquet-$(IO_MODE).csv @@ -50,4 +56,11 @@ bench-run-tpcds-sf1-duckdb: bench-output-dir ./build/release/benchmark/benchmark_runner --root-dir './' 'benchmark/tpcds/sf1/$(IO_MODE)/duckdb/$(BENCHMARK_PATTERN)' 2>&1 | tee benchmark_results/tpcds-sf1-duckdb-$(IO_MODE).csv # COMPARES TPCDS SF1 on parquet file vs on delta files -bench-run-tpcds-sf1: bench-run-tpcds-sf1-delta bench-run-tpcds-sf1-parquet bench-run-tpcds-sf1-duckdb +bench-run-tpcds-sf1: bench-run-tpcds-sf1-delta bench-run-tpcds-sf1-parquet bench-run-tpcds-sf1-duckdb bench-run-tpcds-sf1-delta-attach bench-run-tpcds-sf1-delta-attach-pin + +### +# MICRO +### + +bench-run-snapshot-performance: bench-output-dir + ./build/release/benchmark/benchmark_runner --root-dir './' 'benchmark/micro/snapshot_performance/.*' 2>&1 | tee benchmark_results/snapshot-performance.csv diff --git a/benchmark/micro/snapshot_performance/delta_scan.benchmark b/benchmark/micro/snapshot_performance/delta_scan.benchmark new file mode 100644 index 0000000..f6d4502 --- /dev/null +++ b/benchmark/micro/snapshot_performance/delta_scan.benchmark @@ -0,0 +1,16 @@ +# name: benchmark/micro/snapshot_performance/delta_scan.benchmark +# description: Reference result to compare attach functions to +# group: [aggregate] + +name delta_scan reference +group snapshot_performance + +require delta + +require parquet + +run +SELECT COUNT(*) FROM delta_scan('./data/generated/delta_rs_tpch_sf1_100_splits/lineitem/delta_lake') + +result I +6001215 \ No newline at end of file diff --git a/benchmark/micro/snapshot_performance/delta_scan_filter.benchmark b/benchmark/micro/snapshot_performance/delta_scan_filter.benchmark new file mode 100644 index 0000000..f97dce5 --- /dev/null +++ b/benchmark/micro/snapshot_performance/delta_scan_filter.benchmark @@ -0,0 +1,16 @@ +# name: benchmark/micro/snapshot_performance/delta_scan.benchmark +# description: Reference result to compare attach functions to +# group: [aggregate] + +name delta_scan reference +group snapshot_performance + +require delta + +require parquet + +run +SELECT COUNT(*) FROM delta_scan('./data/generated/delta_rs_tpch_sf1_100_splits/lineitem/delta_lake') where l_orderkey is not null + +result I +6001215 \ No newline at end of file diff --git a/benchmark/micro/snapshot_performance/snapshot_no_pin.benchmark b/benchmark/micro/snapshot_performance/snapshot_no_pin.benchmark new file mode 100644 index 0000000..4ec17f3 --- /dev/null +++ b/benchmark/micro/snapshot_performance/snapshot_no_pin.benchmark @@ -0,0 +1,19 @@ +# name: benchmark/micro/snapshot_performance/snapshot_no_pin.benchmark +# description: Performance of reading from a table with many log entries +# group: [aggregate] + +name Snapshot no pin +group snapshot_performance + +require delta + +require parquet + +load +ATTACH './data/generated/delta_rs_tpch_sf1_100_splits/lineitem/delta_lake' as lineitem_no_pin (TYPE delta); + +run +SELECT COUNT(*) FROM lineitem_no_pin + +result I +6001215 \ No newline at end of file diff --git a/benchmark/micro/snapshot_performance/snapshot_no_pin_filter.benchmark b/benchmark/micro/snapshot_performance/snapshot_no_pin_filter.benchmark new file mode 100644 index 0000000..f24e1ab --- /dev/null +++ b/benchmark/micro/snapshot_performance/snapshot_no_pin_filter.benchmark @@ -0,0 +1,19 @@ +# name: benchmark/micro/snapshot_performance/snapshot_no_pin_filter.benchmark +# description: Performance of reading from a table with many log entries +# group: [aggregate] + +name Snapshot no pin filter +group snapshot_performance + +require delta + +require parquet + +load +ATTACH './data/generated/delta_rs_tpch_sf1_100_splits/lineitem/delta_lake' as lineitem_no_pin (TYPE delta); + +run +SELECT COUNT(*) FROM lineitem_no_pin where l_orderkey is not null + +result I +6001215 \ No newline at end of file diff --git a/benchmark/micro/snapshot_performance/snapshot_pin.benchmark b/benchmark/micro/snapshot_performance/snapshot_pin.benchmark new file mode 100644 index 0000000..3e4dbaf --- /dev/null +++ b/benchmark/micro/snapshot_performance/snapshot_pin.benchmark @@ -0,0 +1,19 @@ +# name: benchmark/micro/snapshot_performance/snapshot_pin.benchmark +# description: Performance of reading from a table with many log entries +# group: [aggregate] + +name Snapshot pin +group snapshot_performance + +require delta + +require parquet + +load +ATTACH './data/generated/delta_rs_tpch_sf1_100_splits/lineitem/delta_lake' as lineitem_pin (TYPE delta, PIN_SNAPSHOT); + +run +SELECT COUNT(*) FROM lineitem_pin + +result I +6001215 \ No newline at end of file diff --git a/benchmark/micro/snapshot_performance/snapshot_pin_filter.benchmark b/benchmark/micro/snapshot_performance/snapshot_pin_filter.benchmark new file mode 100644 index 0000000..ee74eae --- /dev/null +++ b/benchmark/micro/snapshot_performance/snapshot_pin_filter.benchmark @@ -0,0 +1,19 @@ +# name: benchmark/micro/snapshot_performance/snapshot_pin_filter.benchmark +# description: Performance of reading from a table with many log entries +# group: [aggregate] + +name Snapshot pin filter +group snapshot_performance + +require delta + +require parquet + +load +ATTACH './data/generated/delta_rs_tpch_sf1_100_splits/lineitem/delta_lake' as lineitem_pin (TYPE delta, PIN_SNAPSHOT); + +run +SELECT COUNT(*) FROM lineitem_pin where l_orderkey is not null + +result I +6001215 \ No newline at end of file diff --git a/benchmark/tpcds/sf1/local/delta_attach/load.sql b/benchmark/tpcds/sf1/local/delta_attach/load.sql new file mode 100644 index 0000000..3acd7b5 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/load.sql @@ -0,0 +1,24 @@ +ATTACH './data/generated/tpcds_sf1/call_center/delta_lake' as call_center (TYPE delta); +ATTACH './data/generated/tpcds_sf1/catalog_page/delta_lake' as catalog_page (TYPE delta); +ATTACH './data/generated/tpcds_sf1/catalog_returns/delta_lake' as catalog_returns (TYPE delta); +ATTACH './data/generated/tpcds_sf1/catalog_sales/delta_lake' as catalog_sales (TYPE delta); +ATTACH './data/generated/tpcds_sf1/customer/delta_lake' as customer (TYPE delta); +ATTACH './data/generated/tpcds_sf1/customer_demographics/delta_lake' as customer_demographics (TYPE delta); +ATTACH './data/generated/tpcds_sf1/customer_address/delta_lake' as customer_address (TYPE delta); +ATTACH './data/generated/tpcds_sf1/date_dim/delta_lake' as date_dim (TYPE delta); +ATTACH './data/generated/tpcds_sf1/household_demographics/delta_lake' as household_demographics (TYPE delta); +ATTACH './data/generated/tpcds_sf1/inventory/delta_lake' as inventory (TYPE delta); +ATTACH './data/generated/tpcds_sf1/income_band/delta_lake' as income_band (TYPE delta); +ATTACH './data/generated/tpcds_sf1/item/delta_lake' as item (TYPE delta); +ATTACH './data/generated/tpcds_sf1/promotion/delta_lake' as promotion (TYPE delta); +ATTACH './data/generated/tpcds_sf1/reason/delta_lake' as reason (TYPE delta); +ATTACH './data/generated/tpcds_sf1/ship_mode/delta_lake' as ship_mode (TYPE delta); +ATTACH './data/generated/tpcds_sf1/store/delta_lake' as store (TYPE delta); +ATTACH './data/generated/tpcds_sf1/store_returns/delta_lake' as store_returns (TYPE delta); +ATTACH './data/generated/tpcds_sf1/store_sales/delta_lake' as store_sales (TYPE delta); +ATTACH './data/generated/tpcds_sf1/time_dim/delta_lake' as time_dim (TYPE delta); +ATTACH './data/generated/tpcds_sf1/warehouse/delta_lake' as warehouse (TYPE delta); +ATTACH './data/generated/tpcds_sf1/web_page/delta_lake' as web_page (TYPE delta); +ATTACH './data/generated/tpcds_sf1/web_returns/delta_lake' as web_returns (TYPE delta); +ATTACH './data/generated/tpcds_sf1/web_sales/delta_lake' as web_sales (TYPE delta); +ATTACH './data/generated/tpcds_sf1/web_site/delta_lake' as web_site (TYPE delta); \ No newline at end of file diff --git a/benchmark/tpcds/sf1/local/delta_attach/q01.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q01.benchmark new file mode 100644 index 0000000..36a66b1 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q01.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q01.benchmark +# description: Run query 01 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=1 +QUERY_NUMBER_PADDED=01 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q02.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q02.benchmark new file mode 100644 index 0000000..62a0ca0 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q02.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q02.benchmark +# description: Run query 02 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=2 +QUERY_NUMBER_PADDED=02 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q03.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q03.benchmark new file mode 100644 index 0000000..830f785 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q03.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q03.benchmark +# description: Run query 03 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=3 +QUERY_NUMBER_PADDED=03 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q04.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q04.benchmark new file mode 100644 index 0000000..df53a2b --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q04.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q04.benchmark +# description: Run query 04 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=4 +QUERY_NUMBER_PADDED=04 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q05.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q05.benchmark new file mode 100644 index 0000000..aae5d6c --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q05.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q05.benchmark +# description: Run query 05 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=5 +QUERY_NUMBER_PADDED=05 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q06.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q06.benchmark new file mode 100644 index 0000000..f6ec98b --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q06.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q06.benchmark +# description: Run query 06 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=6 +QUERY_NUMBER_PADDED=06 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q07.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q07.benchmark new file mode 100644 index 0000000..1e2563b --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q07.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q07.benchmark +# description: Run query 07 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=7 +QUERY_NUMBER_PADDED=07 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q08.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q08.benchmark new file mode 100644 index 0000000..26c426a --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q08.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q08.benchmark +# description: Run query 08 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=8 +QUERY_NUMBER_PADDED=08 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q09.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q09.benchmark new file mode 100644 index 0000000..c5a388a --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q09.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q09.benchmark +# description: Run query 09 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=9 +QUERY_NUMBER_PADDED=09 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q10.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q10.benchmark new file mode 100644 index 0000000..627c022 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q10.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q10.benchmark +# description: Run query 10 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=10 +QUERY_NUMBER_PADDED=10 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q11.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q11.benchmark new file mode 100644 index 0000000..36909cd --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q11.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q11.benchmark +# description: Run query 11 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=11 +QUERY_NUMBER_PADDED=11 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q12.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q12.benchmark new file mode 100644 index 0000000..0e26df5 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q12.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q12.benchmark +# description: Run query 12 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=12 +QUERY_NUMBER_PADDED=12 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q13.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q13.benchmark new file mode 100644 index 0000000..fad0aed --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q13.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q13.benchmark +# description: Run query 13 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=13 +QUERY_NUMBER_PADDED=13 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q14.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q14.benchmark new file mode 100644 index 0000000..bbb12a3 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q14.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q14.benchmark +# description: Run query 14 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=14 +QUERY_NUMBER_PADDED=14 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q15.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q15.benchmark new file mode 100644 index 0000000..b5ae728 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q15.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q15.benchmark +# description: Run query 15 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=15 +QUERY_NUMBER_PADDED=15 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q16.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q16.benchmark new file mode 100644 index 0000000..e3f7494 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q16.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q16.benchmark +# description: Run query 16 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=16 +QUERY_NUMBER_PADDED=16 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q17.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q17.benchmark new file mode 100644 index 0000000..a15c322 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q17.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q17.benchmark +# description: Run query 17 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=17 +QUERY_NUMBER_PADDED=17 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q18.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q18.benchmark new file mode 100644 index 0000000..b176fcc --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q18.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q18.benchmark +# description: Run query 18 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=18 +QUERY_NUMBER_PADDED=18 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q19.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q19.benchmark new file mode 100644 index 0000000..d53f444 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q19.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q19.benchmark +# description: Run query 19 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=19 +QUERY_NUMBER_PADDED=19 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q20.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q20.benchmark new file mode 100644 index 0000000..7479dea --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q20.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q20.benchmark +# description: Run query 20 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=20 +QUERY_NUMBER_PADDED=20 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q21.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q21.benchmark new file mode 100644 index 0000000..0ba2492 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q21.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q21.benchmark +# description: Run query 21 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=21 +QUERY_NUMBER_PADDED=21 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q22.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q22.benchmark new file mode 100644 index 0000000..458432c --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q22.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q22.benchmark +# description: Run query 22 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=22 +QUERY_NUMBER_PADDED=22 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q23.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q23.benchmark new file mode 100644 index 0000000..c0b5fff --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q23.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q23.benchmark +# description: Run query 23 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=23 +QUERY_NUMBER_PADDED=23 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q24.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q24.benchmark new file mode 100644 index 0000000..c0c0c9b --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q24.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q24.benchmark +# description: Run query 24 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=24 +QUERY_NUMBER_PADDED=24 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q25.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q25.benchmark new file mode 100644 index 0000000..60e8e71 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q25.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q25.benchmark +# description: Run query 25 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=25 +QUERY_NUMBER_PADDED=25 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q26.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q26.benchmark new file mode 100644 index 0000000..86b5909 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q26.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q26.benchmark +# description: Run query 26 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=26 +QUERY_NUMBER_PADDED=26 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q27.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q27.benchmark new file mode 100644 index 0000000..6cc1dd2 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q27.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q27.benchmark +# description: Run query 27 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=27 +QUERY_NUMBER_PADDED=27 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q28.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q28.benchmark new file mode 100644 index 0000000..1753fca --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q28.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q28.benchmark +# description: Run query 28 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=28 +QUERY_NUMBER_PADDED=28 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q29.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q29.benchmark new file mode 100644 index 0000000..52e04c2 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q29.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q29.benchmark +# description: Run query 29 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=29 +QUERY_NUMBER_PADDED=29 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q30.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q30.benchmark new file mode 100644 index 0000000..ed21eb1 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q30.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q30.benchmark +# description: Run query 30 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=30 +QUERY_NUMBER_PADDED=30 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q31.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q31.benchmark new file mode 100644 index 0000000..cdfce45 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q31.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q31.benchmark +# description: Run query 31 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=31 +QUERY_NUMBER_PADDED=31 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q32.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q32.benchmark new file mode 100644 index 0000000..fea4738 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q32.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q32.benchmark +# description: Run query 32 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=32 +QUERY_NUMBER_PADDED=32 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q33.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q33.benchmark new file mode 100644 index 0000000..1cd8f37 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q33.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q33.benchmark +# description: Run query 33 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=33 +QUERY_NUMBER_PADDED=33 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q34.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q34.benchmark new file mode 100644 index 0000000..be18764 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q34.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q34.benchmark +# description: Run query 34 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=34 +QUERY_NUMBER_PADDED=34 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q35.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q35.benchmark new file mode 100644 index 0000000..1c22f98 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q35.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q35.benchmark +# description: Run query 35 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=35 +QUERY_NUMBER_PADDED=35 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q36.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q36.benchmark new file mode 100644 index 0000000..ea57684 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q36.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q36.benchmark +# description: Run query 36 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=36 +QUERY_NUMBER_PADDED=36 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q37.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q37.benchmark new file mode 100644 index 0000000..0a4e760 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q37.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q37.benchmark +# description: Run query 37 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=37 +QUERY_NUMBER_PADDED=37 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q38.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q38.benchmark new file mode 100644 index 0000000..1dd0897 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q38.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q38.benchmark +# description: Run query 38 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=38 +QUERY_NUMBER_PADDED=38 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q39.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q39.benchmark new file mode 100644 index 0000000..5cb5b1b --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q39.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q39.benchmark +# description: Run query 39 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=39 +QUERY_NUMBER_PADDED=39 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q40.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q40.benchmark new file mode 100644 index 0000000..0708d81 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q40.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q40.benchmark +# description: Run query 40 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=40 +QUERY_NUMBER_PADDED=40 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q41.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q41.benchmark new file mode 100644 index 0000000..83e027a --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q41.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q41.benchmark +# description: Run query 41 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=41 +QUERY_NUMBER_PADDED=41 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q42.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q42.benchmark new file mode 100644 index 0000000..051fe20 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q42.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q42.benchmark +# description: Run query 42 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=42 +QUERY_NUMBER_PADDED=42 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q43.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q43.benchmark new file mode 100644 index 0000000..4a1c981 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q43.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q43.benchmark +# description: Run query 43 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=43 +QUERY_NUMBER_PADDED=43 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q44.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q44.benchmark new file mode 100644 index 0000000..42c2a2b --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q44.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q44.benchmark +# description: Run query 44 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=44 +QUERY_NUMBER_PADDED=44 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q45.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q45.benchmark new file mode 100644 index 0000000..fc25799 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q45.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q45.benchmark +# description: Run query 45 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=45 +QUERY_NUMBER_PADDED=45 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q46.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q46.benchmark new file mode 100644 index 0000000..bed3d26 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q46.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q46.benchmark +# description: Run query 46 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=46 +QUERY_NUMBER_PADDED=46 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q47.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q47.benchmark new file mode 100644 index 0000000..fd4631e --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q47.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q47.benchmark +# description: Run query 47 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=47 +QUERY_NUMBER_PADDED=47 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q48.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q48.benchmark new file mode 100644 index 0000000..f23dcc2 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q48.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q48.benchmark +# description: Run query 48 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=48 +QUERY_NUMBER_PADDED=48 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q49.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q49.benchmark new file mode 100644 index 0000000..18288fb --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q49.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q49.benchmark +# description: Run query 49 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=49 +QUERY_NUMBER_PADDED=49 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q50.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q50.benchmark new file mode 100644 index 0000000..40eb2cb --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q50.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q50.benchmark +# description: Run query 50 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=50 +QUERY_NUMBER_PADDED=50 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q51.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q51.benchmark new file mode 100644 index 0000000..1e0357b --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q51.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q51.benchmark +# description: Run query 51 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=51 +QUERY_NUMBER_PADDED=51 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q52.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q52.benchmark new file mode 100644 index 0000000..f0eee1e --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q52.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q52.benchmark +# description: Run query 52 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=52 +QUERY_NUMBER_PADDED=52 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q53.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q53.benchmark new file mode 100644 index 0000000..a4469ee --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q53.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q53.benchmark +# description: Run query 53 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=53 +QUERY_NUMBER_PADDED=53 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q54.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q54.benchmark new file mode 100644 index 0000000..ab97b6a --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q54.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q54.benchmark +# description: Run query 54 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=54 +QUERY_NUMBER_PADDED=54 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q55.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q55.benchmark new file mode 100644 index 0000000..784ddb5 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q55.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q55.benchmark +# description: Run query 55 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=55 +QUERY_NUMBER_PADDED=55 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q56.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q56.benchmark new file mode 100644 index 0000000..c9e6305 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q56.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q56.benchmark +# description: Run query 56 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=56 +QUERY_NUMBER_PADDED=56 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q57.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q57.benchmark new file mode 100644 index 0000000..97a9f31 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q57.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q57.benchmark +# description: Run query 57 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=57 +QUERY_NUMBER_PADDED=57 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q58.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q58.benchmark new file mode 100644 index 0000000..c33493b --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q58.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q58.benchmark +# description: Run query 58 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=58 +QUERY_NUMBER_PADDED=58 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q59.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q59.benchmark new file mode 100644 index 0000000..d8c036b --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q59.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q59.benchmark +# description: Run query 59 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=59 +QUERY_NUMBER_PADDED=59 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q60.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q60.benchmark new file mode 100644 index 0000000..1918bd5 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q60.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q60.benchmark +# description: Run query 60 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=60 +QUERY_NUMBER_PADDED=60 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q61.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q61.benchmark new file mode 100644 index 0000000..32f762d --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q61.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q61.benchmark +# description: Run query 61 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=61 +QUERY_NUMBER_PADDED=61 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q62.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q62.benchmark new file mode 100644 index 0000000..9a373f1 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q62.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q62.benchmark +# description: Run query 62 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=62 +QUERY_NUMBER_PADDED=62 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q63.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q63.benchmark new file mode 100644 index 0000000..e7f6b2f --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q63.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q63.benchmark +# description: Run query 63 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=63 +QUERY_NUMBER_PADDED=63 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q64.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q64.benchmark new file mode 100644 index 0000000..80034a7 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q64.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q64.benchmark +# description: Run query 64 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=64 +QUERY_NUMBER_PADDED=64 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q65.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q65.benchmark new file mode 100644 index 0000000..c128a3e --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q65.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q65.benchmark +# description: Run query 65 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=65 +QUERY_NUMBER_PADDED=65 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q66.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q66.benchmark new file mode 100644 index 0000000..587aa3d --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q66.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q66.benchmark +# description: Run query 66 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=66 +QUERY_NUMBER_PADDED=66 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q67.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q67.benchmark new file mode 100644 index 0000000..6e4d504 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q67.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q67.benchmark +# description: Run query 67 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=67 +QUERY_NUMBER_PADDED=67 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q68.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q68.benchmark new file mode 100644 index 0000000..8f9b7de --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q68.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q68.benchmark +# description: Run query 68 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=68 +QUERY_NUMBER_PADDED=68 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q69.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q69.benchmark new file mode 100644 index 0000000..8027996 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q69.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q69.benchmark +# description: Run query 69 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=69 +QUERY_NUMBER_PADDED=69 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q70.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q70.benchmark new file mode 100644 index 0000000..f64fc6e --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q70.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q70.benchmark +# description: Run query 70 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=70 +QUERY_NUMBER_PADDED=70 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q71.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q71.benchmark new file mode 100644 index 0000000..e34c7b5 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q71.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q71.benchmark +# description: Run query 71 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=71 +QUERY_NUMBER_PADDED=71 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q72.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q72.benchmark new file mode 100644 index 0000000..bedf26e --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q72.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q72.benchmark +# description: Run query 72 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=72 +QUERY_NUMBER_PADDED=72 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q73.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q73.benchmark new file mode 100644 index 0000000..a53877d --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q73.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q73.benchmark +# description: Run query 73 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=73 +QUERY_NUMBER_PADDED=73 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q74.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q74.benchmark new file mode 100644 index 0000000..da3dbd3 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q74.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q74.benchmark +# description: Run query 74 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=74 +QUERY_NUMBER_PADDED=74 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q75.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q75.benchmark new file mode 100644 index 0000000..0970243 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q75.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q75.benchmark +# description: Run query 75 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=75 +QUERY_NUMBER_PADDED=75 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q76.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q76.benchmark new file mode 100644 index 0000000..3c1d28a --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q76.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q76.benchmark +# description: Run query 76 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=76 +QUERY_NUMBER_PADDED=76 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q77.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q77.benchmark new file mode 100644 index 0000000..d7bc196 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q77.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q77.benchmark +# description: Run query 77 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=77 +QUERY_NUMBER_PADDED=77 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q78.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q78.benchmark new file mode 100644 index 0000000..6f5d6f2 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q78.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q78.benchmark +# description: Run query 78 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=78 +QUERY_NUMBER_PADDED=78 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q79.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q79.benchmark new file mode 100644 index 0000000..1d1f213 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q79.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q79.benchmark +# description: Run query 79 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=79 +QUERY_NUMBER_PADDED=79 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q80.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q80.benchmark new file mode 100644 index 0000000..8245c3a --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q80.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q80.benchmark +# description: Run query 80 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=80 +QUERY_NUMBER_PADDED=80 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q81.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q81.benchmark new file mode 100644 index 0000000..7f4595e --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q81.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q81.benchmark +# description: Run query 81 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=81 +QUERY_NUMBER_PADDED=81 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q82.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q82.benchmark new file mode 100644 index 0000000..fe631d4 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q82.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q82.benchmark +# description: Run query 82 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=82 +QUERY_NUMBER_PADDED=82 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q83.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q83.benchmark new file mode 100644 index 0000000..a0e776a --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q83.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q83.benchmark +# description: Run query 83 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=83 +QUERY_NUMBER_PADDED=83 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q84.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q84.benchmark new file mode 100644 index 0000000..37b0eff --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q84.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q84.benchmark +# description: Run query 84 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=84 +QUERY_NUMBER_PADDED=84 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q85.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q85.benchmark new file mode 100644 index 0000000..335038c --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q85.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q85.benchmark +# description: Run query 85 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=85 +QUERY_NUMBER_PADDED=85 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q86.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q86.benchmark new file mode 100644 index 0000000..4eb4b7a --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q86.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q86.benchmark +# description: Run query 86 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=86 +QUERY_NUMBER_PADDED=86 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q87.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q87.benchmark new file mode 100644 index 0000000..1247c5b --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q87.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q87.benchmark +# description: Run query 87 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=87 +QUERY_NUMBER_PADDED=87 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q88.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q88.benchmark new file mode 100644 index 0000000..162bf62 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q88.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q88.benchmark +# description: Run query 88 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=88 +QUERY_NUMBER_PADDED=88 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q89.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q89.benchmark new file mode 100644 index 0000000..39823df --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q89.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q89.benchmark +# description: Run query 89 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=89 +QUERY_NUMBER_PADDED=89 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q90.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q90.benchmark new file mode 100644 index 0000000..ba0cedf --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q90.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q90.benchmark +# description: Run query 90 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=90 +QUERY_NUMBER_PADDED=90 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q91.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q91.benchmark new file mode 100644 index 0000000..b8e20a6 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q91.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q91.benchmark +# description: Run query 91 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=91 +QUERY_NUMBER_PADDED=91 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q92.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q92.benchmark new file mode 100644 index 0000000..21e2e16 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q92.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q92.benchmark +# description: Run query 92 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=92 +QUERY_NUMBER_PADDED=92 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q93.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q93.benchmark new file mode 100644 index 0000000..479c894 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q93.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q93.benchmark +# description: Run query 93 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=93 +QUERY_NUMBER_PADDED=93 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q94.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q94.benchmark new file mode 100644 index 0000000..0395902 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q94.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q94.benchmark +# description: Run query 94 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=94 +QUERY_NUMBER_PADDED=94 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q95.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q95.benchmark new file mode 100644 index 0000000..b268027 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q95.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q95.benchmark +# description: Run query 95 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=95 +QUERY_NUMBER_PADDED=95 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q96.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q96.benchmark new file mode 100644 index 0000000..b393858 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q96.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q96.benchmark +# description: Run query 96 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=96 +QUERY_NUMBER_PADDED=96 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q97.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q97.benchmark new file mode 100644 index 0000000..6793c9c --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q97.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q97.benchmark +# description: Run query 97 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=97 +QUERY_NUMBER_PADDED=97 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q98.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q98.benchmark new file mode 100644 index 0000000..88113c0 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q98.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q98.benchmark +# description: Run query 98 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=98 +QUERY_NUMBER_PADDED=98 diff --git a/benchmark/tpcds/sf1/local/delta_attach/q99.benchmark b/benchmark/tpcds/sf1/local/delta_attach/q99.benchmark new file mode 100644 index 0000000..13fc449 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/q99.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach/q99.benchmark +# description: Run query 99 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in +QUERY_NUMBER=99 +QUERY_NUMBER_PADDED=99 diff --git a/benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in b/benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in new file mode 100644 index 0000000..480092b --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach/tpcds_sf1.benchmark.in @@ -0,0 +1,17 @@ +# name: ${FILE_PATH} +# description: ${DESCRIPTION} +# group: [tpcds-sf1] + +name DSQ${QUERY_NUMBER_PADDED} +group tpcds +subgroup sf1 + +require delta + +require parquet + +load benchmark/tpcds/sf1/local/delta_attach/load.sql + +run duckdb/extension/tpcds/dsdgen/queries/${QUERY_NUMBER_PADDED}.sql + +result duckdb/extension/tpcds/dsdgen/answers/sf1/${QUERY_NUMBER_PADDED}.csv diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/load.sql b/benchmark/tpcds/sf1/local/delta_attach_pin/load.sql new file mode 100644 index 0000000..065d09a --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/load.sql @@ -0,0 +1,24 @@ +ATTACH './data/generated/tpcds_sf1/call_center/delta_lake' as call_center (TYPE delta, PIN_SNAPSHOT); +ATTACH './data/generated/tpcds_sf1/catalog_page/delta_lake' as catalog_page (TYPE delta, PIN_SNAPSHOT); +ATTACH './data/generated/tpcds_sf1/catalog_returns/delta_lake' as catalog_returns (TYPE delta, PIN_SNAPSHOT); +ATTACH './data/generated/tpcds_sf1/catalog_sales/delta_lake' as catalog_sales (TYPE delta, PIN_SNAPSHOT); +ATTACH './data/generated/tpcds_sf1/customer/delta_lake' as customer (TYPE delta, PIN_SNAPSHOT); +ATTACH './data/generated/tpcds_sf1/customer_demographics/delta_lake' as customer_demographics (TYPE delta, PIN_SNAPSHOT); +ATTACH './data/generated/tpcds_sf1/customer_address/delta_lake' as customer_address (TYPE delta, PIN_SNAPSHOT); +ATTACH './data/generated/tpcds_sf1/date_dim/delta_lake' as date_dim (TYPE delta, PIN_SNAPSHOT); +ATTACH './data/generated/tpcds_sf1/household_demographics/delta_lake' as household_demographics (TYPE delta, PIN_SNAPSHOT); +ATTACH './data/generated/tpcds_sf1/inventory/delta_lake' as inventory (TYPE delta, PIN_SNAPSHOT); +ATTACH './data/generated/tpcds_sf1/income_band/delta_lake' as income_band (TYPE delta, PIN_SNAPSHOT); +ATTACH './data/generated/tpcds_sf1/item/delta_lake' as item (TYPE delta, PIN_SNAPSHOT); +ATTACH './data/generated/tpcds_sf1/promotion/delta_lake' as promotion (TYPE delta, PIN_SNAPSHOT); +ATTACH './data/generated/tpcds_sf1/reason/delta_lake' as reason (TYPE delta, PIN_SNAPSHOT); +ATTACH './data/generated/tpcds_sf1/ship_mode/delta_lake' as ship_mode (TYPE delta, PIN_SNAPSHOT); +ATTACH './data/generated/tpcds_sf1/store/delta_lake' as store (TYPE delta, PIN_SNAPSHOT); +ATTACH './data/generated/tpcds_sf1/store_returns/delta_lake' as store_returns (TYPE delta, PIN_SNAPSHOT); +ATTACH './data/generated/tpcds_sf1/store_sales/delta_lake' as store_sales (TYPE delta, PIN_SNAPSHOT); +ATTACH './data/generated/tpcds_sf1/time_dim/delta_lake' as time_dim (TYPE delta, PIN_SNAPSHOT); +ATTACH './data/generated/tpcds_sf1/warehouse/delta_lake' as warehouse (TYPE delta, PIN_SNAPSHOT); +ATTACH './data/generated/tpcds_sf1/web_page/delta_lake' as web_page (TYPE delta, PIN_SNAPSHOT); +ATTACH './data/generated/tpcds_sf1/web_returns/delta_lake' as web_returns (TYPE delta, PIN_SNAPSHOT); +ATTACH './data/generated/tpcds_sf1/web_sales/delta_lake' as web_sales (TYPE delta, PIN_SNAPSHOT); +ATTACH './data/generated/tpcds_sf1/web_site/delta_lake' as web_site (TYPE delta, PIN_SNAPSHOT); \ No newline at end of file diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q01.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q01.benchmark new file mode 100644 index 0000000..fabac15 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q01.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q01.benchmark +# description: Run query 01 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=1 +QUERY_NUMBER_PADDED=01 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q02.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q02.benchmark new file mode 100644 index 0000000..7862a35 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q02.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q02.benchmark +# description: Run query 02 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=2 +QUERY_NUMBER_PADDED=02 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q03.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q03.benchmark new file mode 100644 index 0000000..a6e53ab --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q03.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q03.benchmark +# description: Run query 03 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=3 +QUERY_NUMBER_PADDED=03 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q04.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q04.benchmark new file mode 100644 index 0000000..ad4bb1d --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q04.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q04.benchmark +# description: Run query 04 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=4 +QUERY_NUMBER_PADDED=04 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q05.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q05.benchmark new file mode 100644 index 0000000..44daae0 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q05.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q05.benchmark +# description: Run query 05 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=5 +QUERY_NUMBER_PADDED=05 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q06.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q06.benchmark new file mode 100644 index 0000000..e4a0231 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q06.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q06.benchmark +# description: Run query 06 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=6 +QUERY_NUMBER_PADDED=06 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q07.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q07.benchmark new file mode 100644 index 0000000..4585bcc --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q07.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q07.benchmark +# description: Run query 07 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=7 +QUERY_NUMBER_PADDED=07 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q08.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q08.benchmark new file mode 100644 index 0000000..1a561d1 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q08.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q08.benchmark +# description: Run query 08 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=8 +QUERY_NUMBER_PADDED=08 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q09.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q09.benchmark new file mode 100644 index 0000000..d906a6a --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q09.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q09.benchmark +# description: Run query 09 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=9 +QUERY_NUMBER_PADDED=09 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q10.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q10.benchmark new file mode 100644 index 0000000..6903f11 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q10.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q10.benchmark +# description: Run query 10 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=10 +QUERY_NUMBER_PADDED=10 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q11.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q11.benchmark new file mode 100644 index 0000000..7ff3f46 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q11.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q11.benchmark +# description: Run query 11 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=11 +QUERY_NUMBER_PADDED=11 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q12.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q12.benchmark new file mode 100644 index 0000000..0f9cdbe --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q12.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q12.benchmark +# description: Run query 12 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=12 +QUERY_NUMBER_PADDED=12 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q13.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q13.benchmark new file mode 100644 index 0000000..1c2e511 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q13.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q13.benchmark +# description: Run query 13 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=13 +QUERY_NUMBER_PADDED=13 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q14.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q14.benchmark new file mode 100644 index 0000000..730ecbe --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q14.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q14.benchmark +# description: Run query 14 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=14 +QUERY_NUMBER_PADDED=14 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q15.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q15.benchmark new file mode 100644 index 0000000..92f872b --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q15.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q15.benchmark +# description: Run query 15 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=15 +QUERY_NUMBER_PADDED=15 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q16.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q16.benchmark new file mode 100644 index 0000000..0b3c74f --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q16.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q16.benchmark +# description: Run query 16 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=16 +QUERY_NUMBER_PADDED=16 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q17.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q17.benchmark new file mode 100644 index 0000000..cb96118 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q17.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q17.benchmark +# description: Run query 17 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=17 +QUERY_NUMBER_PADDED=17 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q18.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q18.benchmark new file mode 100644 index 0000000..dc2d5f3 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q18.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q18.benchmark +# description: Run query 18 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=18 +QUERY_NUMBER_PADDED=18 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q19.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q19.benchmark new file mode 100644 index 0000000..eec75af --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q19.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q19.benchmark +# description: Run query 19 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=19 +QUERY_NUMBER_PADDED=19 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q20.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q20.benchmark new file mode 100644 index 0000000..ace71c4 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q20.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q20.benchmark +# description: Run query 20 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=20 +QUERY_NUMBER_PADDED=20 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q21.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q21.benchmark new file mode 100644 index 0000000..bf79d67 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q21.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q21.benchmark +# description: Run query 21 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=21 +QUERY_NUMBER_PADDED=21 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q22.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q22.benchmark new file mode 100644 index 0000000..e6faf31 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q22.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q22.benchmark +# description: Run query 22 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=22 +QUERY_NUMBER_PADDED=22 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q23.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q23.benchmark new file mode 100644 index 0000000..68fd0a2 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q23.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q23.benchmark +# description: Run query 23 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=23 +QUERY_NUMBER_PADDED=23 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q24.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q24.benchmark new file mode 100644 index 0000000..96de8d1 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q24.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q24.benchmark +# description: Run query 24 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=24 +QUERY_NUMBER_PADDED=24 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q25.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q25.benchmark new file mode 100644 index 0000000..027fcf3 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q25.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q25.benchmark +# description: Run query 25 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=25 +QUERY_NUMBER_PADDED=25 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q26.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q26.benchmark new file mode 100644 index 0000000..961b4ad --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q26.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q26.benchmark +# description: Run query 26 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=26 +QUERY_NUMBER_PADDED=26 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q27.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q27.benchmark new file mode 100644 index 0000000..b8bf0c1 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q27.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q27.benchmark +# description: Run query 27 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=27 +QUERY_NUMBER_PADDED=27 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q28.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q28.benchmark new file mode 100644 index 0000000..624550a --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q28.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q28.benchmark +# description: Run query 28 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=28 +QUERY_NUMBER_PADDED=28 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q29.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q29.benchmark new file mode 100644 index 0000000..6174019 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q29.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q29.benchmark +# description: Run query 29 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=29 +QUERY_NUMBER_PADDED=29 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q30.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q30.benchmark new file mode 100644 index 0000000..d3230d4 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q30.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q30.benchmark +# description: Run query 30 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=30 +QUERY_NUMBER_PADDED=30 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q31.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q31.benchmark new file mode 100644 index 0000000..02f1ee3 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q31.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q31.benchmark +# description: Run query 31 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=31 +QUERY_NUMBER_PADDED=31 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q32.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q32.benchmark new file mode 100644 index 0000000..a798c44 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q32.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q32.benchmark +# description: Run query 32 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=32 +QUERY_NUMBER_PADDED=32 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q33.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q33.benchmark new file mode 100644 index 0000000..420af50 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q33.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q33.benchmark +# description: Run query 33 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=33 +QUERY_NUMBER_PADDED=33 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q34.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q34.benchmark new file mode 100644 index 0000000..55998b5 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q34.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q34.benchmark +# description: Run query 34 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=34 +QUERY_NUMBER_PADDED=34 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q35.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q35.benchmark new file mode 100644 index 0000000..9af5004 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q35.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q35.benchmark +# description: Run query 35 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=35 +QUERY_NUMBER_PADDED=35 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q36.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q36.benchmark new file mode 100644 index 0000000..7391980 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q36.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q36.benchmark +# description: Run query 36 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=36 +QUERY_NUMBER_PADDED=36 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q37.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q37.benchmark new file mode 100644 index 0000000..c6e6635 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q37.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q37.benchmark +# description: Run query 37 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=37 +QUERY_NUMBER_PADDED=37 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q38.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q38.benchmark new file mode 100644 index 0000000..703d1e7 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q38.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q38.benchmark +# description: Run query 38 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=38 +QUERY_NUMBER_PADDED=38 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q39.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q39.benchmark new file mode 100644 index 0000000..38c1957 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q39.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q39.benchmark +# description: Run query 39 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=39 +QUERY_NUMBER_PADDED=39 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q40.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q40.benchmark new file mode 100644 index 0000000..46fbc31 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q40.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q40.benchmark +# description: Run query 40 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=40 +QUERY_NUMBER_PADDED=40 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q41.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q41.benchmark new file mode 100644 index 0000000..0de449f --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q41.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q41.benchmark +# description: Run query 41 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=41 +QUERY_NUMBER_PADDED=41 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q42.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q42.benchmark new file mode 100644 index 0000000..453995f --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q42.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q42.benchmark +# description: Run query 42 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=42 +QUERY_NUMBER_PADDED=42 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q43.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q43.benchmark new file mode 100644 index 0000000..b1ce9a5 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q43.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q43.benchmark +# description: Run query 43 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=43 +QUERY_NUMBER_PADDED=43 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q44.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q44.benchmark new file mode 100644 index 0000000..ffb4344 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q44.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q44.benchmark +# description: Run query 44 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=44 +QUERY_NUMBER_PADDED=44 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q45.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q45.benchmark new file mode 100644 index 0000000..1e2c35b --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q45.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q45.benchmark +# description: Run query 45 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=45 +QUERY_NUMBER_PADDED=45 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q46.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q46.benchmark new file mode 100644 index 0000000..e51ed26 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q46.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q46.benchmark +# description: Run query 46 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=46 +QUERY_NUMBER_PADDED=46 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q47.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q47.benchmark new file mode 100644 index 0000000..4b62cb4 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q47.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q47.benchmark +# description: Run query 47 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=47 +QUERY_NUMBER_PADDED=47 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q48.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q48.benchmark new file mode 100644 index 0000000..d7ed70f --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q48.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q48.benchmark +# description: Run query 48 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=48 +QUERY_NUMBER_PADDED=48 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q49.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q49.benchmark new file mode 100644 index 0000000..224ed96 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q49.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q49.benchmark +# description: Run query 49 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=49 +QUERY_NUMBER_PADDED=49 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q50.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q50.benchmark new file mode 100644 index 0000000..39904e9 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q50.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q50.benchmark +# description: Run query 50 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=50 +QUERY_NUMBER_PADDED=50 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q51.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q51.benchmark new file mode 100644 index 0000000..693c7e2 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q51.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q51.benchmark +# description: Run query 51 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=51 +QUERY_NUMBER_PADDED=51 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q52.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q52.benchmark new file mode 100644 index 0000000..54020c7 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q52.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q52.benchmark +# description: Run query 52 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=52 +QUERY_NUMBER_PADDED=52 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q53.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q53.benchmark new file mode 100644 index 0000000..158a5de --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q53.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q53.benchmark +# description: Run query 53 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=53 +QUERY_NUMBER_PADDED=53 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q54.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q54.benchmark new file mode 100644 index 0000000..48e4562 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q54.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q54.benchmark +# description: Run query 54 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=54 +QUERY_NUMBER_PADDED=54 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q55.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q55.benchmark new file mode 100644 index 0000000..6df4d49 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q55.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q55.benchmark +# description: Run query 55 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=55 +QUERY_NUMBER_PADDED=55 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q56.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q56.benchmark new file mode 100644 index 0000000..b84fb56 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q56.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q56.benchmark +# description: Run query 56 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=56 +QUERY_NUMBER_PADDED=56 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q57.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q57.benchmark new file mode 100644 index 0000000..c4a69a1 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q57.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q57.benchmark +# description: Run query 57 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=57 +QUERY_NUMBER_PADDED=57 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q58.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q58.benchmark new file mode 100644 index 0000000..ebe0655 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q58.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q58.benchmark +# description: Run query 58 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=58 +QUERY_NUMBER_PADDED=58 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q59.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q59.benchmark new file mode 100644 index 0000000..0a81d8b --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q59.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q59.benchmark +# description: Run query 59 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=59 +QUERY_NUMBER_PADDED=59 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q60.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q60.benchmark new file mode 100644 index 0000000..986d2df --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q60.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q60.benchmark +# description: Run query 60 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=60 +QUERY_NUMBER_PADDED=60 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q61.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q61.benchmark new file mode 100644 index 0000000..fdb8bb7 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q61.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q61.benchmark +# description: Run query 61 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=61 +QUERY_NUMBER_PADDED=61 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q62.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q62.benchmark new file mode 100644 index 0000000..b4454e7 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q62.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q62.benchmark +# description: Run query 62 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=62 +QUERY_NUMBER_PADDED=62 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q63.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q63.benchmark new file mode 100644 index 0000000..72805e6 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q63.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q63.benchmark +# description: Run query 63 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=63 +QUERY_NUMBER_PADDED=63 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q64.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q64.benchmark new file mode 100644 index 0000000..a3b7267 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q64.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q64.benchmark +# description: Run query 64 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=64 +QUERY_NUMBER_PADDED=64 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q65.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q65.benchmark new file mode 100644 index 0000000..4c50bd9 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q65.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q65.benchmark +# description: Run query 65 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=65 +QUERY_NUMBER_PADDED=65 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q66.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q66.benchmark new file mode 100644 index 0000000..2e9ede8 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q66.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q66.benchmark +# description: Run query 66 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=66 +QUERY_NUMBER_PADDED=66 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q67.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q67.benchmark new file mode 100644 index 0000000..f50871c --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q67.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q67.benchmark +# description: Run query 67 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=67 +QUERY_NUMBER_PADDED=67 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q68.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q68.benchmark new file mode 100644 index 0000000..f2c8808 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q68.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q68.benchmark +# description: Run query 68 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=68 +QUERY_NUMBER_PADDED=68 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q69.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q69.benchmark new file mode 100644 index 0000000..7b7f4d2 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q69.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q69.benchmark +# description: Run query 69 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=69 +QUERY_NUMBER_PADDED=69 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q70.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q70.benchmark new file mode 100644 index 0000000..98d7bad --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q70.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q70.benchmark +# description: Run query 70 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=70 +QUERY_NUMBER_PADDED=70 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q71.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q71.benchmark new file mode 100644 index 0000000..ad7b7a9 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q71.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q71.benchmark +# description: Run query 71 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=71 +QUERY_NUMBER_PADDED=71 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q72.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q72.benchmark new file mode 100644 index 0000000..cb4496b --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q72.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q72.benchmark +# description: Run query 72 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=72 +QUERY_NUMBER_PADDED=72 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q73.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q73.benchmark new file mode 100644 index 0000000..a291e47 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q73.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q73.benchmark +# description: Run query 73 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=73 +QUERY_NUMBER_PADDED=73 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q74.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q74.benchmark new file mode 100644 index 0000000..d470aa9 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q74.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q74.benchmark +# description: Run query 74 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=74 +QUERY_NUMBER_PADDED=74 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q75.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q75.benchmark new file mode 100644 index 0000000..8795c49 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q75.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q75.benchmark +# description: Run query 75 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=75 +QUERY_NUMBER_PADDED=75 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q76.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q76.benchmark new file mode 100644 index 0000000..a4082b6 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q76.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q76.benchmark +# description: Run query 76 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=76 +QUERY_NUMBER_PADDED=76 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q77.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q77.benchmark new file mode 100644 index 0000000..2ace6b6 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q77.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q77.benchmark +# description: Run query 77 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=77 +QUERY_NUMBER_PADDED=77 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q78.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q78.benchmark new file mode 100644 index 0000000..8c7e396 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q78.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q78.benchmark +# description: Run query 78 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=78 +QUERY_NUMBER_PADDED=78 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q79.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q79.benchmark new file mode 100644 index 0000000..b977a62 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q79.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q79.benchmark +# description: Run query 79 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=79 +QUERY_NUMBER_PADDED=79 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q80.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q80.benchmark new file mode 100644 index 0000000..67df3e5 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q80.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q80.benchmark +# description: Run query 80 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=80 +QUERY_NUMBER_PADDED=80 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q81.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q81.benchmark new file mode 100644 index 0000000..d240ada --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q81.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q81.benchmark +# description: Run query 81 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=81 +QUERY_NUMBER_PADDED=81 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q82.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q82.benchmark new file mode 100644 index 0000000..e8f98c3 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q82.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q82.benchmark +# description: Run query 82 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=82 +QUERY_NUMBER_PADDED=82 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q83.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q83.benchmark new file mode 100644 index 0000000..5508996 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q83.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q83.benchmark +# description: Run query 83 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=83 +QUERY_NUMBER_PADDED=83 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q84.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q84.benchmark new file mode 100644 index 0000000..05404d1 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q84.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q84.benchmark +# description: Run query 84 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=84 +QUERY_NUMBER_PADDED=84 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q85.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q85.benchmark new file mode 100644 index 0000000..46592c3 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q85.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q85.benchmark +# description: Run query 85 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=85 +QUERY_NUMBER_PADDED=85 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q86.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q86.benchmark new file mode 100644 index 0000000..72ca931 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q86.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q86.benchmark +# description: Run query 86 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=86 +QUERY_NUMBER_PADDED=86 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q87.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q87.benchmark new file mode 100644 index 0000000..44525a3 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q87.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q87.benchmark +# description: Run query 87 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=87 +QUERY_NUMBER_PADDED=87 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q88.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q88.benchmark new file mode 100644 index 0000000..f6c7875 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q88.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q88.benchmark +# description: Run query 88 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=88 +QUERY_NUMBER_PADDED=88 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q89.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q89.benchmark new file mode 100644 index 0000000..2f9a540 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q89.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q89.benchmark +# description: Run query 89 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=89 +QUERY_NUMBER_PADDED=89 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q90.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q90.benchmark new file mode 100644 index 0000000..72193ac --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q90.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q90.benchmark +# description: Run query 90 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=90 +QUERY_NUMBER_PADDED=90 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q91.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q91.benchmark new file mode 100644 index 0000000..5706ce5 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q91.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q91.benchmark +# description: Run query 91 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=91 +QUERY_NUMBER_PADDED=91 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q92.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q92.benchmark new file mode 100644 index 0000000..582d72d --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q92.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q92.benchmark +# description: Run query 92 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=92 +QUERY_NUMBER_PADDED=92 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q93.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q93.benchmark new file mode 100644 index 0000000..15af12b --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q93.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q93.benchmark +# description: Run query 93 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=93 +QUERY_NUMBER_PADDED=93 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q94.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q94.benchmark new file mode 100644 index 0000000..3545dc4 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q94.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q94.benchmark +# description: Run query 94 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=94 +QUERY_NUMBER_PADDED=94 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q95.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q95.benchmark new file mode 100644 index 0000000..f230bba --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q95.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q95.benchmark +# description: Run query 95 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=95 +QUERY_NUMBER_PADDED=95 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q96.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q96.benchmark new file mode 100644 index 0000000..e721966 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q96.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q96.benchmark +# description: Run query 96 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=96 +QUERY_NUMBER_PADDED=96 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q97.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q97.benchmark new file mode 100644 index 0000000..fc40c93 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q97.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q97.benchmark +# description: Run query 97 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=97 +QUERY_NUMBER_PADDED=97 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q98.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q98.benchmark new file mode 100644 index 0000000..4a8bc99 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q98.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q98.benchmark +# description: Run query 98 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=98 +QUERY_NUMBER_PADDED=98 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/q99.benchmark b/benchmark/tpcds/sf1/local/delta_attach_pin/q99.benchmark new file mode 100644 index 0000000..ddec43c --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/q99.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpcds/sf1/local/delta_attach_pin/q99.benchmark +# description: Run query 99 from the TPC-DS benchmark +# group: [sf1] + +template benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in +QUERY_NUMBER=99 +QUERY_NUMBER_PADDED=99 diff --git a/benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in b/benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in new file mode 100644 index 0000000..db2f631 --- /dev/null +++ b/benchmark/tpcds/sf1/local/delta_attach_pin/tpcds_sf1.benchmark.in @@ -0,0 +1,17 @@ +# name: ${FILE_PATH} +# description: ${DESCRIPTION} +# group: [tpcds-sf1] + +name DSQ${QUERY_NUMBER_PADDED} +group tpcds +subgroup sf1 + +require delta + +require parquet + +load benchmark/tpcds/sf1/local/delta_attach_pin/load.sql + +run duckdb/extension/tpcds/dsdgen/queries/${QUERY_NUMBER_PADDED}.sql + +result duckdb/extension/tpcds/dsdgen/answers/sf1/${QUERY_NUMBER_PADDED}.csv diff --git a/benchmark/tpch/sf1/local/delta_attach/load.sql b/benchmark/tpch/sf1/local/delta_attach/load.sql new file mode 100644 index 0000000..cbeac72 --- /dev/null +++ b/benchmark/tpch/sf1/local/delta_attach/load.sql @@ -0,0 +1,8 @@ +ATTACH './data/generated/tpch_sf1/customer/delta_lake' as customer (TYPE delta); +ATTACH './data/generated/tpch_sf1/lineitem/delta_lake' as lineitem (TYPE delta); +ATTACH './data/generated/tpch_sf1/nation/delta_lake' as nation (TYPE delta); +ATTACH './data/generated/tpch_sf1/orders/delta_lake' as orders (TYPE delta); +ATTACH './data/generated/tpch_sf1/part/delta_lake' as part (TYPE delta); +ATTACH './data/generated/tpch_sf1/partsupp/delta_lake' as partsupp (TYPE delta); +ATTACH './data/generated/tpch_sf1/region/delta_lake' as region (TYPE delta); +ATTACH './data/generated/tpch_sf1/supplier/delta_lake' as supplier (TYPE delta); \ No newline at end of file diff --git a/benchmark/tpch/sf1/local/delta_attach/q01.benchmark b/benchmark/tpch/sf1/local/delta_attach/q01.benchmark new file mode 100644 index 0000000..fc1f938 --- /dev/null +++ b/benchmark/tpch/sf1/local/delta_attach/q01.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpch/sf1/local/delta_attach/q01.benchmark +# description: Run query 01 from the TPC-H benchmark +# group: [sf1-parquet] + +template benchmark/tpch/sf1/local/delta_attach/tpch_sf1_delta.benchmark.in +QUERY_NUMBER=1 +QUERY_NUMBER_PADDED=01 diff --git a/benchmark/tpch/sf1/local/delta_attach/q02.benchmark b/benchmark/tpch/sf1/local/delta_attach/q02.benchmark new file mode 100644 index 0000000..84c3bbc --- /dev/null +++ b/benchmark/tpch/sf1/local/delta_attach/q02.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpch/sf1/local/delta_attach/q02.benchmark +# description: Run query 02 from the TPC-H benchmark +# group: [sf1-parquet] + +template benchmark/tpch/sf1/local/delta_attach/tpch_sf1_delta.benchmark.in +QUERY_NUMBER=2 +QUERY_NUMBER_PADDED=02 diff --git a/benchmark/tpch/sf1/local/delta_attach/q03.benchmark b/benchmark/tpch/sf1/local/delta_attach/q03.benchmark new file mode 100644 index 0000000..18d2608 --- /dev/null +++ b/benchmark/tpch/sf1/local/delta_attach/q03.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpch/sf1/local/delta_attach/q03.benchmark +# description: Run query 03 from the TPC-H benchmark +# group: [sf1-parquet] + +template benchmark/tpch/sf1/local/delta_attach/tpch_sf1_delta.benchmark.in +QUERY_NUMBER=3 +QUERY_NUMBER_PADDED=03 diff --git a/benchmark/tpch/sf1/local/delta_attach/q04.benchmark b/benchmark/tpch/sf1/local/delta_attach/q04.benchmark new file mode 100644 index 0000000..a9ab91e --- /dev/null +++ b/benchmark/tpch/sf1/local/delta_attach/q04.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpch/sf1/local/delta_attach/q04.benchmark +# description: Run query 04 from the TPC-H benchmark +# group: [sf1-parquet] + +template benchmark/tpch/sf1/local/delta_attach/tpch_sf1_delta.benchmark.in +QUERY_NUMBER=4 +QUERY_NUMBER_PADDED=04 diff --git a/benchmark/tpch/sf1/local/delta_attach/q05.benchmark b/benchmark/tpch/sf1/local/delta_attach/q05.benchmark new file mode 100644 index 0000000..d276a76 --- /dev/null +++ b/benchmark/tpch/sf1/local/delta_attach/q05.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpch/sf1/local/delta_attach/q05.benchmark +# description: Run query 05 from the TPC-H benchmark +# group: [sf1-parquet] + +template benchmark/tpch/sf1/local/delta_attach/tpch_sf1_delta.benchmark.in +QUERY_NUMBER=5 +QUERY_NUMBER_PADDED=05 diff --git a/benchmark/tpch/sf1/local/delta_attach/q06.benchmark b/benchmark/tpch/sf1/local/delta_attach/q06.benchmark new file mode 100644 index 0000000..a525c49 --- /dev/null +++ b/benchmark/tpch/sf1/local/delta_attach/q06.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpch/sf1/local/delta_attach/q06.benchmark +# description: Run query 06 from the TPC-H benchmark +# group: [sf1-parquet] + +template benchmark/tpch/sf1/local/delta_attach/tpch_sf1_delta.benchmark.in +QUERY_NUMBER=6 +QUERY_NUMBER_PADDED=06 diff --git a/benchmark/tpch/sf1/local/delta_attach/q07.benchmark b/benchmark/tpch/sf1/local/delta_attach/q07.benchmark new file mode 100644 index 0000000..42177a3 --- /dev/null +++ b/benchmark/tpch/sf1/local/delta_attach/q07.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpch/sf1/local/delta_attach/q07.benchmark +# description: Run query 07 from the TPC-H benchmark +# group: [sf1-parquet] + +template benchmark/tpch/sf1/local/delta_attach/tpch_sf1_delta.benchmark.in +QUERY_NUMBER=7 +QUERY_NUMBER_PADDED=07 diff --git a/benchmark/tpch/sf1/local/delta_attach/q08.benchmark b/benchmark/tpch/sf1/local/delta_attach/q08.benchmark new file mode 100644 index 0000000..3f4f74d --- /dev/null +++ b/benchmark/tpch/sf1/local/delta_attach/q08.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpch/sf1/local/delta_attach/q08.benchmark +# description: Run query 08 from the TPC-H benchmark +# group: [sf1-parquet] + +template benchmark/tpch/sf1/local/delta_attach/tpch_sf1_delta.benchmark.in +QUERY_NUMBER=8 +QUERY_NUMBER_PADDED=08 diff --git a/benchmark/tpch/sf1/local/delta_attach/q09.benchmark b/benchmark/tpch/sf1/local/delta_attach/q09.benchmark new file mode 100644 index 0000000..cb80c45 --- /dev/null +++ b/benchmark/tpch/sf1/local/delta_attach/q09.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpch/sf1/local/delta_attach/q09.benchmark +# description: Run query 09 from the TPC-H benchmark +# group: [sf1-parquet] + +template benchmark/tpch/sf1/local/delta_attach/tpch_sf1_delta.benchmark.in +QUERY_NUMBER=9 +QUERY_NUMBER_PADDED=09 diff --git a/benchmark/tpch/sf1/local/delta_attach/q10.benchmark b/benchmark/tpch/sf1/local/delta_attach/q10.benchmark new file mode 100644 index 0000000..a800252 --- /dev/null +++ b/benchmark/tpch/sf1/local/delta_attach/q10.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpch/sf1/local/delta_attach/q10.benchmark +# description: Run query 10 from the TPC-H benchmark +# group: [sf1-parquet] + +template benchmark/tpch/sf1/local/delta_attach/tpch_sf1_delta.benchmark.in +QUERY_NUMBER=10 +QUERY_NUMBER_PADDED=10 diff --git a/benchmark/tpch/sf1/local/delta_attach/q11.benchmark b/benchmark/tpch/sf1/local/delta_attach/q11.benchmark new file mode 100644 index 0000000..11baed8 --- /dev/null +++ b/benchmark/tpch/sf1/local/delta_attach/q11.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpch/sf1/local/delta_attach/q11.benchmark +# description: Run query 11 from the TPC-H benchmark +# group: [sf1-parquet] + +template benchmark/tpch/sf1/local/delta_attach/tpch_sf1_delta.benchmark.in +QUERY_NUMBER=11 +QUERY_NUMBER_PADDED=11 diff --git a/benchmark/tpch/sf1/local/delta_attach/q12.benchmark b/benchmark/tpch/sf1/local/delta_attach/q12.benchmark new file mode 100644 index 0000000..e115292 --- /dev/null +++ b/benchmark/tpch/sf1/local/delta_attach/q12.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpch/sf1/local/delta_attach/q12.benchmark +# description: Run query 12 from the TPC-H benchmark +# group: [sf1-parquet] + +template benchmark/tpch/sf1/local/delta_attach/tpch_sf1_delta.benchmark.in +QUERY_NUMBER=12 +QUERY_NUMBER_PADDED=12 diff --git a/benchmark/tpch/sf1/local/delta_attach/q13.benchmark b/benchmark/tpch/sf1/local/delta_attach/q13.benchmark new file mode 100644 index 0000000..729c4f2 --- /dev/null +++ b/benchmark/tpch/sf1/local/delta_attach/q13.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpch/sf1/local/delta_attach/q13.benchmark +# description: Run query 13 from the TPC-H benchmark +# group: [sf1-parquet] + +template benchmark/tpch/sf1/local/delta_attach/tpch_sf1_delta.benchmark.in +QUERY_NUMBER=13 +QUERY_NUMBER_PADDED=13 diff --git a/benchmark/tpch/sf1/local/delta_attach/q14.benchmark b/benchmark/tpch/sf1/local/delta_attach/q14.benchmark new file mode 100644 index 0000000..923abb0 --- /dev/null +++ b/benchmark/tpch/sf1/local/delta_attach/q14.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpch/sf1/local/delta_attach/q14.benchmark +# description: Run query 14 from the TPC-H benchmark +# group: [sf1-parquet] + +template benchmark/tpch/sf1/local/delta_attach/tpch_sf1_delta.benchmark.in +QUERY_NUMBER=14 +QUERY_NUMBER_PADDED=14 diff --git a/benchmark/tpch/sf1/local/delta_attach/q15.benchmark b/benchmark/tpch/sf1/local/delta_attach/q15.benchmark new file mode 100644 index 0000000..c16240c --- /dev/null +++ b/benchmark/tpch/sf1/local/delta_attach/q15.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpch/sf1/local/delta_attach/q15.benchmark +# description: Run query 15 from the TPC-H benchmark +# group: [sf1-parquet] + +template benchmark/tpch/sf1/local/delta_attach/tpch_sf1_delta.benchmark.in +QUERY_NUMBER=15 +QUERY_NUMBER_PADDED=15 diff --git a/benchmark/tpch/sf1/local/delta_attach/q16.benchmark b/benchmark/tpch/sf1/local/delta_attach/q16.benchmark new file mode 100644 index 0000000..83db3e0 --- /dev/null +++ b/benchmark/tpch/sf1/local/delta_attach/q16.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpch/sf1/local/delta_attach/q16.benchmark +# description: Run query 16 from the TPC-H benchmark +# group: [sf1-parquet] + +template benchmark/tpch/sf1/local/delta_attach/tpch_sf1_delta.benchmark.in +QUERY_NUMBER=16 +QUERY_NUMBER_PADDED=16 diff --git a/benchmark/tpch/sf1/local/delta_attach/q17.benchmark b/benchmark/tpch/sf1/local/delta_attach/q17.benchmark new file mode 100644 index 0000000..28dbc83 --- /dev/null +++ b/benchmark/tpch/sf1/local/delta_attach/q17.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpch/sf1/local/delta_attach/q17.benchmark +# description: Run query 17 from the TPC-H benchmark +# group: [sf1-parquet] + +template benchmark/tpch/sf1/local/delta_attach/tpch_sf1_delta.benchmark.in +QUERY_NUMBER=17 +QUERY_NUMBER_PADDED=17 diff --git a/benchmark/tpch/sf1/local/delta_attach/q18.benchmark b/benchmark/tpch/sf1/local/delta_attach/q18.benchmark new file mode 100644 index 0000000..1e969a7 --- /dev/null +++ b/benchmark/tpch/sf1/local/delta_attach/q18.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpch/sf1/local/delta_attach/q18.benchmark +# description: Run query 18 from the TPC-H benchmark +# group: [sf1-parquet] + +template benchmark/tpch/sf1/local/delta_attach/tpch_sf1_delta.benchmark.in +QUERY_NUMBER=18 +QUERY_NUMBER_PADDED=18 diff --git a/benchmark/tpch/sf1/local/delta_attach/q19.benchmark b/benchmark/tpch/sf1/local/delta_attach/q19.benchmark new file mode 100644 index 0000000..259c78a --- /dev/null +++ b/benchmark/tpch/sf1/local/delta_attach/q19.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpch/sf1/local/delta_attach/q19.benchmark +# description: Run query 19 from the TPC-H benchmark +# group: [sf1-parquet] + +template benchmark/tpch/sf1/local/delta_attach/tpch_sf1_delta.benchmark.in +QUERY_NUMBER=19 +QUERY_NUMBER_PADDED=19 diff --git a/benchmark/tpch/sf1/local/delta_attach/q20.benchmark b/benchmark/tpch/sf1/local/delta_attach/q20.benchmark new file mode 100644 index 0000000..82d1c3a --- /dev/null +++ b/benchmark/tpch/sf1/local/delta_attach/q20.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpch/sf1/local/delta_attach/q20.benchmark +# description: Run query 20 from the TPC-H benchmark +# group: [sf1-parquet] + +template benchmark/tpch/sf1/local/delta_attach/tpch_sf1_delta.benchmark.in +QUERY_NUMBER=20 +QUERY_NUMBER_PADDED=20 diff --git a/benchmark/tpch/sf1/local/delta_attach/q21.benchmark b/benchmark/tpch/sf1/local/delta_attach/q21.benchmark new file mode 100644 index 0000000..bd30f2a --- /dev/null +++ b/benchmark/tpch/sf1/local/delta_attach/q21.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpch/sf1/local/delta_attach/q21.benchmark +# description: Run query 21 from the TPC-H benchmark +# group: [sf1-parquet] + +template benchmark/tpch/sf1/local/delta_attach/tpch_sf1_delta.benchmark.in +QUERY_NUMBER=21 +QUERY_NUMBER_PADDED=21 diff --git a/benchmark/tpch/sf1/local/delta_attach/q22.benchmark b/benchmark/tpch/sf1/local/delta_attach/q22.benchmark new file mode 100644 index 0000000..410457e --- /dev/null +++ b/benchmark/tpch/sf1/local/delta_attach/q22.benchmark @@ -0,0 +1,7 @@ +# name: benchmark/tpch/sf1/local/delta_attach/q22.benchmark +# description: Run query 22 from the TPC-H benchmark +# group: [sf1-parquet] + +template benchmark/tpch/sf1/local/delta_attach/tpch_sf1_delta.benchmark.in +QUERY_NUMBER=22 +QUERY_NUMBER_PADDED=22 diff --git a/benchmark/tpch/sf1/local/delta_attach/tpch_sf1_delta.benchmark.in b/benchmark/tpch/sf1/local/delta_attach/tpch_sf1_delta.benchmark.in new file mode 100644 index 0000000..fb8c916 --- /dev/null +++ b/benchmark/tpch/sf1/local/delta_attach/tpch_sf1_delta.benchmark.in @@ -0,0 +1,17 @@ +# name: ${FILE_PATH} +# description: ${DESCRIPTION} +# group: [sf1] + +name Q${QUERY_NUMBER_PADDED} +group tpch +subgroup sf1 + +require delta + +require parquet + +load benchmark/tpch/sf1/local/delta_attach/load.sql + +run duckdb/extension/tpch/dbgen/queries/q${QUERY_NUMBER_PADDED}.sql + +result duckdb/extension/tpch/dbgen/answers/sf1/q${QUERY_NUMBER_PADDED}.csv \ No newline at end of file diff --git a/duckdb b/duckdb index 1986445..89bcc3e 160000 --- a/duckdb +++ b/duckdb @@ -1 +1 @@ -Subproject commit 19864453f7d0ed095256d848b46e7b8630989bac +Subproject commit 89bcc3e2ce739b1b470afa79818ee03c8cf96fe8 diff --git a/extension-ci-tools b/extension-ci-tools index 83f847f..4317e39 160000 --- a/extension-ci-tools +++ b/extension-ci-tools @@ -1 +1 @@ -Subproject commit 83f847f8467a760f6c66dc7996c13300210220a8 +Subproject commit 4317e39099f4b71d614f00d044aaec651bec6fc9 diff --git a/scripts/generate_test_data.py b/scripts/generate_test_data.py index b817faa..001b9b2 100644 --- a/scripts/generate_test_data.py +++ b/scripts/generate_test_data.py @@ -32,7 +32,7 @@ def generate_test_data_delta_rs_multi(path, init, tables, splits = 1): os.makedirs(f"{generated_path}") - # First we write a DuckDB file TODO: this should go in 10 appends as well? + # First we write a DuckDB file TODO: this should go in N appends as well? con = duckdb.connect(f"{generated_path}/duckdb.db") con.sql(init) @@ -40,14 +40,21 @@ def generate_test_data_delta_rs_multi(path, init, tables, splits = 1): # Then we write the parquet files for table in tables: total_count = con.sql(f"select count(*) from ({table['query']})").fetchall()[0][0] - tuples_per_file = math.ceil(total_count / splits) + # At least 1 tuple per file + if total_count < splits: + splits = total_count + tuples_per_file = total_count // splits + remainder = total_count % splits file_no = 0 + write_from = 0 while file_no < splits: os.makedirs(f"{generated_path}/{table['name']}/parquet", exist_ok=True) # Write DuckDB's reference data - con.sql(f"COPY ({table['query']} where rowid >= {(file_no) * tuples_per_file} and rowid < {(file_no+1) * tuples_per_file}) to '{generated_path}/{table['name']}/parquet/data_{file_no}.parquet' (FORMAT parquet)") + write_to = write_from + tuples_per_file + (1 if file_no < remainder else 0) + con.sql(f"COPY ({table['query']} where rowid >= {write_from} and rowid < {write_to}) to '{generated_path}/{table['name']}/parquet/data_{file_no}.parquet' (FORMAT parquet)") file_no += 1 + write_from = write_to for table in tables: con = duckdb.connect(f"{generated_path}/duckdb.db") @@ -173,7 +180,7 @@ def generate_test_data_pyspark(name, current_path, input_path, delete_predicate ## Partitioned table with all types we can file skip on for type in ["bool", "int", "tinyint", "smallint", "bigint", "float", "double", "varchar"]: - query = f"CREATE table test_table as select i::{type} as value, i::{type} as part from range(0,2) tbl(i)" + query = f"CREATE table test_table as select i::{type} as value1, (i)::{type} as value2, (i)::{type} as value3, i::{type} as part from range(0,5) tbl(i)" generate_test_data_delta_rs(f"test_file_skipping/{type}", query, "part") ## Simple table with deletion vector diff --git a/scripts/plot.py b/scripts/plot.py index 9090f3f..2ca01bc 100644 --- a/scripts/plot.py +++ b/scripts/plot.py @@ -5,6 +5,7 @@ parser = argparse.ArgumentParser(description='Plot the results in ./benchmark_results') parser.add_argument('-p','--pattern', help='Pattern to match result csv files to', required=False, default='*.csv') parser.add_argument('-w','--width', help='Width of graph, adjust to fit data', required=False, default=20) +parser.add_argument('-n','--name', help='name of the graph ', required=False, default='') args = vars(parser.parse_args()) ### Parse Query Results @@ -34,5 +35,5 @@ import numpy as np plt.rcParams["figure.figsize"] = [int(args['width']), 5] -fig = benchmark_results.pivot(index='benchmark', columns='config', values='timing').plot(kind='bar', title='', ylabel='runtime [s]').get_figure() +fig = benchmark_results.pivot(index='benchmark', columns='config', values='timing').plot(kind='bar', title=args['name'], ylabel='runtime [s]').get_figure() fig.savefig('benchmark_results/result.png') \ No newline at end of file diff --git a/src/delta_extension.cpp b/src/delta_extension.cpp index 9fc95d0..dac8888 100644 --- a/src/delta_extension.cpp +++ b/src/delta_extension.cpp @@ -2,18 +2,76 @@ #include "delta_extension.hpp" +#include "delta_utils.hpp" #include "delta_functions.hpp" #include "duckdb.hpp" #include "duckdb/common/exception.hpp" #include "duckdb/main/extension_util.hpp" +#include "duckdb/storage/storage_extension.hpp" +#include "storage/delta_catalog.hpp" +#include "storage/delta_transaction_manager.hpp" +#include "duckdb/main/config.hpp" namespace duckdb { +static unique_ptr DeltaCatalogAttach(StorageExtensionInfo *storage_info, ClientContext &context, + AttachedDatabase &db, const string &name, AttachInfo &info, + AccessMode access_mode) { + + auto res = make_uniq(db, info.path, access_mode); + + for (const auto &option : info.options) { + if (StringUtil::Lower(option.first) == "pin_snapshot") { + res->use_cache = option.second.GetValue(); + } + } + + res->SetDefaultTable(DEFAULT_SCHEMA, DEFAULT_DELTA_TABLE); + + return std::move(res); +} + +static unique_ptr CreateTransactionManager(StorageExtensionInfo *storage_info, AttachedDatabase &db, + Catalog &catalog) { + auto &delta_catalog = catalog.Cast(); + return make_uniq(db, delta_catalog); +} + +class DeltaStorageExtension : public StorageExtension { +public: + DeltaStorageExtension() { + attach = DeltaCatalogAttach; + create_transaction_manager = CreateTransactionManager; + } +}; + static void LoadInternal(DatabaseInstance &instance) { - // Load functions + // Load Table functions for (const auto &function : DeltaFunctions::GetTableFunctions(instance)) { ExtensionUtil::RegisterFunction(instance, function); } + + // Load Scalar functions + for (const auto &function : DeltaFunctions::GetScalarFunctions(instance)) { + ExtensionUtil::RegisterFunction(instance, function); + } + + // Register the "single table" delta catalog (to ATTACH a single delta table) + auto &config = DBConfig::GetConfig(instance); + config.storage_extensions["delta"] = make_uniq(); + + config.AddExtensionOption("delta_scan_explain_files_filtered", + "Adds the filtered files to the explain output. Warning: this may impact performance of " + "delta scan during explain analyze queries.", + LogicalType::BOOLEAN, Value(true)); + + config.AddExtensionOption( + "delta_kernel_logging", + "Forwards the internal logging of the Delta Kernel to the duckdb logger. Warning: this may impact " + "performance even with DuckDB logging disabled.", + LogicalType::BOOLEAN, Value(false), LoggerCallback::DuckDBSettingCallBack); + + LoggerCallback::Initialize(instance); } void DeltaExtension::Load(DuckDB &db) { diff --git a/src/delta_functions.cpp b/src/delta_functions.cpp index e79894b..922d0d2 100644 --- a/src/delta_functions.cpp +++ b/src/delta_functions.cpp @@ -2,8 +2,7 @@ #include "duckdb.hpp" #include "duckdb/main/extension_util.hpp" - -#include +#include "duckdb/parser/parsed_data/create_scalar_function_info.hpp" namespace duckdb { @@ -15,4 +14,12 @@ vector DeltaFunctions::GetTableFunctions(DatabaseInstance &ins return functions; } +vector DeltaFunctions::GetScalarFunctions(DatabaseInstance &instance) { + vector functions; + + functions.push_back(GetExpressionFunction(instance)); + + return functions; +} + }; // namespace duckdb diff --git a/src/delta_utils.cpp b/src/delta_utils.cpp index 035d300..9cf8337 100644 --- a/src/delta_utils.cpp +++ b/src/delta_utils.cpp @@ -1,23 +1,329 @@ #include "delta_utils.hpp" +#include + #include "duckdb.hpp" #include "duckdb/main/extension_util.hpp" +#include "duckdb/main/database.hpp" #include #include +#include "duckdb/parser/expression/conjunction_expression.hpp" +#include "duckdb/parser/expression/comparison_expression.hpp" +#include "duckdb/parser/expression/function_expression.hpp" +#include "duckdb/parser/expression/operator_expression.hpp" +#include "duckdb/common/types/decimal.hpp" namespace duckdb { +void ExpressionVisitor::VisitComparisonExpression(void *state, uintptr_t sibling_list_id, uintptr_t child_list_id) { + auto state_cast = static_cast(state); + + auto children = state_cast->TakeFieldList(child_list_id); + if (!children) { + return; + } + + auto &lhs = children->at(0); + auto &rhs = children->at(1); + unique_ptr expression = + make_uniq(ExpressionType::COMPARE_LESSTHAN, std::move(lhs), std::move(rhs)); + state_cast->AppendToList(sibling_list_id, std::move(expression)); +} + +unique_ptr>> +ExpressionVisitor::VisitKernelExpression(const ffi::Handle *expression) { + ExpressionVisitor state; + ffi::EngineExpressionVisitor visitor; + + visitor.data = &state; + visitor.make_field_list = (uintptr_t(*)(void *, uintptr_t)) & MakeFieldList; + + // Templated primitive functions + visitor.visit_literal_bool = VisitPrimitiveLiteralBool; + visitor.visit_literal_byte = VisitPrimitiveLiteralByte; + visitor.visit_literal_short = VisitPrimitiveLiteralShort; + visitor.visit_literal_int = VisitPrimitiveLiteralInt; + visitor.visit_literal_long = VisitPrimitiveLiteralLong; + visitor.visit_literal_float = VisitPrimitiveLiteralFloat; + visitor.visit_literal_double = VisitPrimitiveLiteralDouble; + + visitor.visit_literal_decimal = VisitDecimalLiteral; + + // Custom Implementations + visitor.visit_literal_timestamp = &VisitTimestampLiteral; + visitor.visit_literal_timestamp_ntz = &VisitTimestampNtzLiteral; + visitor.visit_literal_date = &VisitDateLiteral; + + visitor.visit_literal_string = &VisitStringLiteral; + + visitor.visit_literal_binary = &VisitBinaryLiteral; + visitor.visit_literal_null = &VisitNullLiteral; + visitor.visit_literal_array = &VisitArrayLiteral; + + visitor.visit_and = VisitVariadicExpression(); + visitor.visit_or = VisitVariadicExpression(); + + visitor.visit_lt = VisitBinaryExpression(); + visitor.visit_le = VisitBinaryExpression(); + visitor.visit_gt = VisitBinaryExpression(); + visitor.visit_ge = VisitBinaryExpression(); + + visitor.visit_eq = VisitBinaryExpression(); + visitor.visit_ne = VisitBinaryExpression(); + visitor.visit_distinct = VisitBinaryExpression(); + + visitor.visit_in = VisitVariadicExpression(); + visitor.visit_not_in = VisitVariadicExpression(); + + visitor.visit_add = VisitAdditionExpression; + visitor.visit_minus = VisitSubctractionExpression; + visitor.visit_multiply = VisitMultiplyExpression; + visitor.visit_divide = VisitDivideExpression; + + visitor.visit_column = &VisitColumnExpression; + visitor.visit_struct_expr = &VisitStructExpression; + + visitor.visit_literal_struct = &VisitStructLiteral; + + visitor.visit_not = &VisitNotExpression; + visitor.visit_is_null = &VisitIsNullExpression; + + uintptr_t result = ffi::visit_expression(expression, &visitor); + + if (state.error.HasError()) { + state.error.Throw(); + } + + return state.TakeFieldList(result); +} + +void ExpressionVisitor::VisitAdditionExpression(void *state, uintptr_t sibling_list_id, uintptr_t child_list_id) { + auto state_cast = static_cast(state); + auto children = state_cast->TakeFieldList(child_list_id); + if (!children) { + return; + } + unique_ptr expression = + make_uniq("+", std::move(*children), nullptr, nullptr, false, true); + state_cast->AppendToList(sibling_list_id, std::move(expression)); +} + +void ExpressionVisitor::VisitSubctractionExpression(void *state, uintptr_t sibling_list_id, uintptr_t child_list_id) { + auto state_cast = static_cast(state); + auto children = state_cast->TakeFieldList(child_list_id); + if (!children) { + return; + } + unique_ptr expression = + make_uniq("-", std::move(*children), nullptr, nullptr, false, true); + state_cast->AppendToList(sibling_list_id, std::move(expression)); +} + +void ExpressionVisitor::VisitDivideExpression(void *state, uintptr_t sibling_list_id, uintptr_t child_list_id) { + auto state_cast = static_cast(state); + auto children = state_cast->TakeFieldList(child_list_id); + if (!children) { + return; + } + unique_ptr expression = + make_uniq("/", std::move(*children), nullptr, nullptr, false, true); + state_cast->AppendToList(sibling_list_id, std::move(expression)); +} + +void ExpressionVisitor::VisitMultiplyExpression(void *state, uintptr_t sibling_list_id, uintptr_t child_list_id) { + auto state_cast = static_cast(state); + auto children = state_cast->TakeFieldList(child_list_id); + if (!children) { + return; + } + unique_ptr expression = + make_uniq("*", std::move(*children), nullptr, nullptr, false, true); + state_cast->AppendToList(sibling_list_id, std::move(expression)); +} + +void ExpressionVisitor::VisitPrimitiveLiteralBool(void *state, uintptr_t sibling_list_id, bool value) { + auto expression = make_uniq(Value::BOOLEAN(value)); + static_cast(state)->AppendToList(sibling_list_id, std::move(expression)); +} +void ExpressionVisitor::VisitPrimitiveLiteralByte(void *state, uintptr_t sibling_list_id, int8_t value) { + auto expression = make_uniq(Value::TINYINT(value)); + static_cast(state)->AppendToList(sibling_list_id, std::move(expression)); +} +void ExpressionVisitor::VisitPrimitiveLiteralShort(void *state, uintptr_t sibling_list_id, int16_t value) { + auto expression = make_uniq(Value::SMALLINT(value)); + static_cast(state)->AppendToList(sibling_list_id, std::move(expression)); +} +void ExpressionVisitor::VisitPrimitiveLiteralInt(void *state, uintptr_t sibling_list_id, int32_t value) { + auto expression = make_uniq(Value::INTEGER(value)); + static_cast(state)->AppendToList(sibling_list_id, std::move(expression)); +} +void ExpressionVisitor::VisitPrimitiveLiteralLong(void *state, uintptr_t sibling_list_id, int64_t value) { + auto expression = make_uniq(Value::BIGINT(value)); + static_cast(state)->AppendToList(sibling_list_id, std::move(expression)); +} +void ExpressionVisitor::VisitPrimitiveLiteralFloat(void *state, uintptr_t sibling_list_id, float value) { + auto expression = make_uniq(Value::FLOAT(value)); + static_cast(state)->AppendToList(sibling_list_id, std::move(expression)); +} +void ExpressionVisitor::VisitPrimitiveLiteralDouble(void *state, uintptr_t sibling_list_id, double value) { + auto expression = make_uniq(Value::DOUBLE(value)); + static_cast(state)->AppendToList(sibling_list_id, std::move(expression)); +} + +void ExpressionVisitor::VisitTimestampLiteral(void *state, uintptr_t sibling_list_id, int64_t value) { + auto expression = make_uniq(Value::TIMESTAMPTZ(timestamp_tz_t(value))); + static_cast(state)->AppendToList(sibling_list_id, std::move(expression)); +} + +void ExpressionVisitor::VisitTimestampNtzLiteral(void *state, uintptr_t sibling_list_id, int64_t value) { + auto expression = make_uniq(Value::TIMESTAMP(static_cast(value))); + static_cast(state)->AppendToList(sibling_list_id, std::move(expression)); +} + +void ExpressionVisitor::VisitDateLiteral(void *state, uintptr_t sibling_list_id, int32_t value) { + auto expression = make_uniq(Value::DATE(static_cast(value))); + static_cast(state)->AppendToList(sibling_list_id, std::move(expression)); +} + +void ExpressionVisitor::VisitStringLiteral(void *state, uintptr_t sibling_list_id, ffi::KernelStringSlice value) { + auto expression = make_uniq(Value(string(value.ptr, value.len))); + static_cast(state)->AppendToList(sibling_list_id, std::move(expression)); +} +void ExpressionVisitor::VisitBinaryLiteral(void *state, uintptr_t sibling_list_id, const uint8_t *buffer, + uintptr_t len) { + auto expression = make_uniq(Value::BLOB(buffer, len)); + static_cast(state)->AppendToList(sibling_list_id, std::move(expression)); +} +void ExpressionVisitor::VisitNullLiteral(void *state, uintptr_t sibling_list_id) { + auto expression = make_uniq(Value()); + static_cast(state)->AppendToList(sibling_list_id, std::move(expression)); +} +void ExpressionVisitor::VisitArrayLiteral(void *state, uintptr_t sibling_list_id, uintptr_t child_id) { + auto state_cast = static_cast(state); + auto children = state_cast->TakeFieldList(child_id); + if (!children) { + return; + } + unique_ptr expression = make_uniq("list_value", std::move(*children)); + state_cast->AppendToList(sibling_list_id, std::move(expression)); +} + +void ExpressionVisitor::VisitStructLiteral(void *state, uintptr_t sibling_list_id, uintptr_t child_field_list_value, + uintptr_t child_value_list_id) { + auto state_cast = static_cast(state); + + auto children_keys = state_cast->TakeFieldList(child_field_list_value); + auto children_values = state_cast->TakeFieldList(child_value_list_id); + if (!children_values || !children_keys) { + return; + } + + if (children_values->size() != children_keys->size()) { + state_cast->error = + ErrorData("Size of Keys and Values vector do not match in ExpressionVisitor::VisitStructLiteral"); + return; + } + + for (idx_t i = 0; i < children_keys->size(); i++) { + (*children_values)[i]->alias = (*children_keys)[i]->ToString(); + } + + unique_ptr expression = make_uniq("struct_pack", std::move(*children_values)); + state_cast->AppendToList(sibling_list_id, std::move(expression)); +} + +void ExpressionVisitor::VisitNotExpression(void *state, uintptr_t sibling_list_id, uintptr_t child_list_id) { + auto state_cast = static_cast(state); + auto children = state_cast->TakeFieldList(child_list_id); + if (!children) { + return; + } + unique_ptr expression = + make_uniq("NOT", std::move(*children), nullptr, nullptr, false, true); + state_cast->AppendToList(sibling_list_id, std::move(expression)); +} + +void ExpressionVisitor::VisitIsNullExpression(void *state, uintptr_t sibling_list_id, uintptr_t child_list_id) { + auto state_cast = static_cast(state); + auto children = state_cast->TakeFieldList(child_list_id); + if (!children) { + return; + } + + children->push_back(make_uniq(Value())); + unique_ptr expression = + make_uniq("IS", std::move(*children), nullptr, nullptr, false, true); + state_cast->AppendToList(sibling_list_id, std::move(expression)); +} + +// FIXME: this is not 100% correct yet: value_ms is ignored +void ExpressionVisitor::VisitDecimalLiteral(void *state, uintptr_t sibling_list_id, uint64_t value_ms, + uint64_t value_ls, uint8_t precision, uint8_t scale) { + try { + if (precision >= Decimal::MAX_WIDTH_INT64 || value_ls > (uint64_t)NumericLimits::Maximum()) { + throw NotImplementedException("ExpressionVisitor::VisitDecimalLiteral HugeInt decimals"); + } + auto expression = make_uniq(Value::DECIMAL(42, 18, 10)); + static_cast(state)->AppendToList(sibling_list_id, std::move(expression)); + } catch (Exception &e) { + static_cast(state)->error = ErrorData(e); + } +} + +void ExpressionVisitor::VisitColumnExpression(void *state, uintptr_t sibling_list_id, ffi::KernelStringSlice name) { + auto expression = make_uniq(string(name.ptr, name.len)); + static_cast(state)->AppendToList(sibling_list_id, std::move(expression)); +} +void ExpressionVisitor::VisitStructExpression(void *state, uintptr_t sibling_list_id, uintptr_t child_list_id) { + static_cast(state)->AppendToList(sibling_list_id, + std::move(make_uniq(Value(42)))); +} + +uintptr_t ExpressionVisitor::MakeFieldList(ExpressionVisitor *state, uintptr_t capacity_hint) { + return state->MakeFieldListImpl(capacity_hint); +} +uintptr_t ExpressionVisitor::MakeFieldListImpl(uintptr_t capacity_hint) { + uintptr_t id = next_id++; + auto list = make_uniq(); + if (capacity_hint > 0) { + list->reserve(capacity_hint); + } + inflight_lists.emplace(id, std::move(list)); + return id; +} + +void ExpressionVisitor::AppendToList(uintptr_t id, unique_ptr child) { + auto it = inflight_lists.find(id); + if (it == inflight_lists.end()) { + error = ErrorData("ExpressionVisitor::AppendToList could not find " + Value::UBIGINT(id).ToString()); + return; + } + + it->second->emplace_back(std::move(child)); +} + +unique_ptr ExpressionVisitor::TakeFieldList(uintptr_t id) { + auto it = inflight_lists.find(id); + if (it == inflight_lists.end()) { + error = ErrorData("ExpressionVisitor::TakeFieldList could not find " + Value::UBIGINT(id).ToString()); + return nullptr; + } + auto rval = std::move(it->second); + inflight_lists.erase(it); + return rval; +} + unique_ptr SchemaVisitor::VisitSnapshotSchema(ffi::SharedSnapshot *snapshot) { SchemaVisitor state; ffi::EngineSchemaVisitor visitor; visitor.data = &state; - visitor.make_field_list = (uintptr_t (*)(void *, uintptr_t))&MakeFieldList; - visitor.visit_struct = (void (*)(void *, uintptr_t, ffi::KernelStringSlice, uintptr_t))&VisitStruct; - visitor.visit_array = (void (*)(void *, uintptr_t, ffi::KernelStringSlice, bool, uintptr_t))&VisitArray; - visitor.visit_map = (void (*)(void *, uintptr_t, ffi::KernelStringSlice, bool, uintptr_t))&VisitMap; - visitor.visit_decimal = (void (*)(void *, uintptr_t, ffi::KernelStringSlice, uint8_t, uint8_t))&VisitDecimal; + visitor.make_field_list = (uintptr_t(*)(void *, uintptr_t)) & MakeFieldList; + visitor.visit_struct = (void (*)(void *, uintptr_t, ffi::KernelStringSlice, uintptr_t)) & VisitStruct; + visitor.visit_array = (void (*)(void *, uintptr_t, ffi::KernelStringSlice, bool, uintptr_t)) & VisitArray; + visitor.visit_map = (void (*)(void *, uintptr_t, ffi::KernelStringSlice, bool, uintptr_t)) & VisitMap; + visitor.visit_decimal = (void (*)(void *, uintptr_t, ffi::KernelStringSlice, uint8_t, uint8_t)) & VisitDecimal; visitor.visit_string = VisitSimpleType(); visitor.visit_long = VisitSimpleType(); visitor.visit_integer = VisitSimpleType(); @@ -79,18 +385,15 @@ uintptr_t SchemaVisitor::MakeFieldListImpl(uintptr_t capacity_hint) { void SchemaVisitor::AppendToList(uintptr_t id, ffi::KernelStringSlice name, LogicalType &&child) { auto it = inflight_lists.find(id); if (it == inflight_lists.end()) { - // TODO... some error... - throw InternalException("WEIRD SHIT"); - } else { - it->second->emplace_back(std::make_pair(string(name.ptr, name.len), std::move(child))); + throw InternalException("Unhandled error in SchemaVisitor::AppendToList child"); } + it->second->emplace_back(std::make_pair(string(name.ptr, name.len), std::move(child))); } unique_ptr SchemaVisitor::TakeFieldList(uintptr_t id) { auto it = inflight_lists.find(id); if (it == inflight_lists.end()) { - // TODO: Raise some kind of error. - throw InternalException("WEIRD SHIT 2"); + throw InternalException("Unhandled error in SchemaVisitor::TakeFieldList"); } auto rval = std::move(it->second); inflight_lists.erase(it); @@ -105,39 +408,50 @@ 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", - }; - - static_assert(sizeof(KERNEL_ERROR_ENUM_STRINGS) / sizeof(char *) - 1 == (int)ffi::KernelError::InvalidDecimalError, + const char *KERNEL_ERROR_ENUM_STRINGS[] = {"UnknownError", + "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", + "ChangeDataFeedIncompatibleSchema", + "InvalidCheckpoint"}; + + static_assert(sizeof(KERNEL_ERROR_ENUM_STRINGS) / sizeof(char *) - 1 == (int)ffi::KernelError::InvalidCheckpoint, "KernelErrorEnumStrings mismatched with kernel"); if ((int)err < sizeof(KERNEL_ERROR_ENUM_STRINGS) / sizeof(char *)) { @@ -176,7 +490,7 @@ vector KernelUtils::FromDeltaBoolSlice(const struct ffi::KernelBoolSlice s PredicateVisitor::PredicateVisitor(const vector &column_names, optional_ptr filters) { predicate = this; - visitor = (uintptr_t (*)(void *, ffi::KernelExpressionVisitorState *))&VisitPredicate; + visitor = (uintptr_t(*)(void *, ffi::KernelExpressionVisitorState *)) & VisitPredicate; if (filters) { for (auto &filter : filters->filters) { @@ -321,4 +635,73 @@ uintptr_t PredicateVisitor::VisitFilter(const string &col_name, const TableFilte } } +void LoggerCallback::Initialize(DatabaseInstance &db_p) { + auto &instance = GetInstance(); + unique_lock lck(instance.lock); + if (instance.db.expired()) { + instance.db = db_p.shared_from_this(); + } +} + +void LoggerCallback::CallbackEvent(ffi::Event event) { + auto &instance = GetInstance(); + auto db_locked = instance.db.lock(); + if (db_locked) { + auto transformed_log_level = GetDuckDBLogLevel(event.level); + string constructed_log_message; + Logger::Log("delta.Kernel", *db_locked, transformed_log_level, [&]() { + auto log_type = KernelUtils::FromDeltaString(event.target); + auto message = KernelUtils::FromDeltaString(event.message); + auto file = KernelUtils::FromDeltaString(event.file); + if (!file.empty()) { + constructed_log_message = StringUtil::Format("[%s] %s@%u : %s ", log_type, file, event.line, message); + } else { + constructed_log_message = message; + } + + return constructed_log_message.c_str(); + }); + } +} + +LogLevel LoggerCallback::GetDuckDBLogLevel(ffi::Level level) { + switch (level) { + case ffi::Level::TRACE: + return LogLevel::LOG_TRACE; + case ffi::Level::DEBUGGING: + return LogLevel::LOG_DEBUG; + case ffi::Level::INFO: + return LogLevel::LOG_INFO; + case ffi::Level::WARN: + return LogLevel::LOG_WARN; + case ffi::Level::ERROR: + return LogLevel::LOG_ERROR; + } +} + +LoggerCallback &LoggerCallback::GetInstance() { + static LoggerCallback instance; + return instance; +} + +void LoggerCallback::DuckDBSettingCallBack(ClientContext &context, SetScope scope, Value ¶meter) { + Value current_setting; + auto res = context.TryGetCurrentSetting("delta_kernel_logging", current_setting); + + if (res.GetScope() == SettingScope::INVALID) { + throw InternalException("Failed to find setting 'delta_kernel_logging'"); + } + + if (current_setting.GetValue() && !parameter.GetValue()) { + throw InvalidInputException("Can not disable 'delta_kernel_logging' after enabling it. You can disable DuckDB " + "logging with SET enable_logging=false, but there will still be some performance " + "overhead from 'delta_kernel_logging'" + "that can only be mitigated by restarting DuckDB"); + } + + if (!current_setting.GetValue() && parameter.GetValue()) { + ffi::enable_event_tracing(LoggerCallback::CallbackEvent, ffi::Level::TRACE); + } +} + }; // namespace duckdb diff --git a/src/functions/delta_scan.cpp b/src/functions/delta_scan.cpp index 098ed23..6836abb 100644 --- a/src/functions/delta_scan.cpp +++ b/src/functions/delta_scan.cpp @@ -1,4 +1,5 @@ #include "functions/delta_scan.hpp" +#include "storage/delta_catalog.hpp" #include "delta_functions.hpp" #include "duckdb/catalog/catalog_entry/table_function_catalog_entry.hpp" @@ -15,11 +16,10 @@ #include "duckdb/parser/parsed_expression.hpp" #include "duckdb/planner/binder.hpp" #include "duckdb/planner/operator/logical_get.hpp" +#include "duckdb/main/query_profiler.hpp" +#include "duckdb/main/client_data.hpp" -#include -#include #include -#include namespace duckdb { @@ -46,9 +46,9 @@ string url_decode(string input) { return result; } -static void visit_callback(ffi::NullableCvoid engine_context, struct ffi::KernelStringSlice path, int64_t size, - const ffi::Stats *stats, const ffi::DvInfo *dv_info, - const struct ffi::CStringMap *partition_values) { +void DeltaSnapshot::VisitCallback(ffi::NullableCvoid engine_context, struct ffi::KernelStringSlice path, int64_t size, + const ffi::Stats *stats, const ffi::DvInfo *dv_info, + const struct ffi::CStringMap *partition_values) { auto context = (DeltaSnapshot *)engine_context; auto path_string = context->GetPath(); StringUtil::RTrim(path_string, "/"); @@ -91,9 +91,9 @@ static void visit_callback(ffi::NullableCvoid engine_context, struct ffi::Kernel context->metadata.back()->partition_map = std::move(constant_map); } -static void visit_data(void *engine_context, ffi::ExclusiveEngineData *engine_data, - const struct ffi::KernelBoolSlice selection_vec) { - ffi::visit_scan_data(engine_data, selection_vec, engine_context, visit_callback); +void DeltaSnapshot::VisitData(void *engine_context, ffi::ExclusiveEngineData *engine_data, + const struct ffi::KernelBoolSlice selection_vec) { + ffi::visit_scan_data(engine_data, selection_vec, engine_context, VisitCallback); } string ParseAccountNameFromEndpoint(const string &endpoint) { @@ -238,7 +238,6 @@ static ffi::EngineBuilder *CreateBuilder(ClientContext &context, const string &p // Here you would need to add the logic for setting the builder options for Azure // This is just a placeholder and will need to be replaced with the actual logic if (secret_type == "s3" || secret_type == "gcs" || secret_type == "r2") { - string key_id, secret, session_token, region, endpoint, url_style; bool use_ssl = true; secret_reader.TryGetSecretKey("key_id", key_id); @@ -276,10 +275,14 @@ static ffi::EngineBuilder *CreateBuilder(ClientContext &context, const string &p } if (StringUtil::StartsWith(endpoint, "http://")) { - ffi::set_builder_option(builder, KernelUtils::ToDeltaString("allow_http"), KernelUtils::ToDeltaString("true")); + ffi::set_builder_option(builder, KernelUtils::ToDeltaString("allow_http"), + KernelUtils::ToDeltaString("true")); } ffi::set_builder_option(builder, KernelUtils::ToDeltaString("aws_endpoint"), KernelUtils::ToDeltaString(endpoint)); + } else if (StringUtil::StartsWith(path, "gs://") || StringUtil::StartsWith(path, "gcs://")) { + ffi::set_builder_option(builder, KernelUtils::ToDeltaString("aws_endpoint"), + KernelUtils::ToDeltaString("https://storage.googleapis.com")); } ffi::set_builder_option(builder, KernelUtils::ToDeltaString("aws_region"), KernelUtils::ToDeltaString(region)); @@ -361,7 +364,8 @@ static ffi::EngineBuilder *CreateBuilder(ClientContext &context, const string &p } // Set the use_emulator option for when the azurite test server is used if (account_name == "devstoreaccount1" || connection_string.find("devstoreaccount1") != string::npos) { - ffi::set_builder_option(builder, KernelUtils::ToDeltaString("use_emulator"), KernelUtils::ToDeltaString("true")); + ffi::set_builder_option(builder, KernelUtils::ToDeltaString("use_emulator"), + KernelUtils::ToDeltaString("true")); } if (!account_name.empty()) { ffi::set_builder_option(builder, KernelUtils::ToDeltaString("account_name"), @@ -371,7 +375,8 @@ static ffi::EngineBuilder *CreateBuilder(ClientContext &context, const string &p ffi::set_builder_option(builder, KernelUtils::ToDeltaString("azure_endpoint"), KernelUtils::ToDeltaString(endpoint)); } - ffi::set_builder_option(builder, KernelUtils::ToDeltaString("container_name"), KernelUtils::ToDeltaString(bucket)); + ffi::set_builder_option(builder, KernelUtils::ToDeltaString("container_name"), + KernelUtils::ToDeltaString(bucket)); } return builder; } @@ -380,7 +385,7 @@ DeltaSnapshot::DeltaSnapshot(ClientContext &context_p, const string &path) : MultiFileList({ToDeltaPath(path)}, FileGlobOptions::ALLOW_EMPTY), context(context_p) { } -string DeltaSnapshot::GetPath() { +string DeltaSnapshot::GetPath() const { return GetPaths()[0]; } @@ -410,22 +415,44 @@ string DeltaSnapshot::ToDeltaPath(const string &raw_path) { } void DeltaSnapshot::Bind(vector &return_types, vector &names) { - if (!initialized) { - InitializeFiles(); + unique_lock lck(lock); + + if (have_bound) { + names = this->names; + return_types = this->types; + return; + } + + if (!initialized_snapshot) { + InitializeSnapshot(); } - auto schema = SchemaVisitor::VisitSnapshotSchema(snapshot.get()); + + unique_ptr schema; + + { + auto snapshot_ref = snapshot->GetLockingRef(); + schema = SchemaVisitor::VisitSnapshotSchema(snapshot_ref.GetPtr()); + } + for (const auto &field : *schema) { names.push_back(field.first); return_types.push_back(field.second); } // Store the bound names for resolving the complex filter pushdown later + have_bound = true; this->names = names; + this->types = return_types; } -string DeltaSnapshot::GetFile(idx_t i) { - if (!initialized) { - InitializeFiles(); +string DeltaSnapshot::GetFileInternal(idx_t i) { + if (!initialized_snapshot) { + InitializeSnapshot(); + } + + if (!initialized_scan) { + InitializeScan(); } + // We already have this file if (i < resolved_files.size()) { return resolved_files[i]; @@ -436,7 +463,7 @@ string DeltaSnapshot::GetFile(idx_t i) { } while (i >= resolved_files.size()) { - auto have_scan_data_res = ffi::kernel_scan_data_next(scan_data_iterator.get(), this, visit_data); + auto have_scan_data_res = ffi::kernel_scan_data_next(scan_data_iterator.get(), this, VisitData); auto have_scan_data = TryUnpackKernelResult(have_scan_data_res); @@ -447,38 +474,46 @@ string DeltaSnapshot::GetFile(idx_t i) { } } - // The kernel scan visitor should have resolved a file OR returned - if (i >= resolved_files.size()) { - throw IOException("Delta Kernel seems to have failed to resolve a new file"); - } - return resolved_files[i]; } -void DeltaSnapshot::InitializeFiles() { +string DeltaSnapshot::GetFile(idx_t i) { + // TODO: profile this: we should be able to use atomics here to optimize + unique_lock lck(lock); + return GetFileInternal(i); +} + +void DeltaSnapshot::InitializeSnapshot() { auto path_slice = KernelUtils::ToDeltaString(paths[0]); - // Register engine auto interface_builder = CreateBuilder(context, paths[0]); extern_engine = TryUnpackKernelResult(ffi::builder_build(interface_builder)); - // Initialize Snapshot - snapshot = TryUnpackKernelResult(ffi::snapshot(path_slice, extern_engine.get())); + if (!snapshot) { + snapshot = make_shared_ptr( + TryUnpackKernelResult(ffi::snapshot(path_slice, extern_engine.get()))); + } + + initialized_snapshot = true; +} + +void DeltaSnapshot::InitializeScan() { + auto snapshot_ref = snapshot->GetLockingRef(); // Create Scan PredicateVisitor visitor(names, &table_filters); - scan = TryUnpackKernelResult(ffi::scan(snapshot.get(), extern_engine.get(), &visitor)); + scan = TryUnpackKernelResult(ffi::scan(snapshot_ref.GetPtr(), extern_engine.get(), &visitor)); // Create GlobalState global_state = ffi::get_global_scan_state(scan.get()); // Set version - this->version = ffi::version(snapshot.get()); + this->version = ffi::version(snapshot_ref.GetPtr()); // Create scan data iterator scan_data_iterator = TryUnpackKernelResult(ffi::kernel_scan_data_init(extern_engine.get(), scan.get())); - initialized = true; + initialized_scan = true; } unique_ptr DeltaSnapshot::ComplexFilterPushdown(ClientContext &context, @@ -486,45 +521,101 @@ unique_ptr DeltaSnapshot::ComplexFilterPushdown(ClientContext &co MultiFilePushdownInfo &info, vector> &filters) { FilterCombiner combiner(context); - for (const auto &filter : filters) { - combiner.AddFilter(filter->Copy()); + + if (filters.empty()) { + return nullptr; + } + + for (auto riter = filters.rbegin(); riter != filters.rend(); ++riter) { + combiner.AddFilter(riter->get()->Copy()); } - auto filterstmp = combiner.GenerateTableScanFilters(info.column_ids); - // TODO: can/should we figure out if this filtered anything? + auto filterstmp = combiner.GenerateTableScanFilters(info.column_indexes); + auto filtered_list = make_uniq(context, paths[0]); filtered_list->table_filters = std::move(filterstmp); filtered_list->names = names; + // Copy over the snapshot, this avoids reparsing metadata + { + unique_lock lck(lock); + filtered_list->snapshot = snapshot; + } + + auto &profiler = QueryProfiler::Get(context); + + // Note: this is potentially quite expensive: we are creating 2 scans of the snapshot and fully materializing both + // file lists Therefore this is only done when profile is enabled. This is enable by default in debug mode or for + // EXPLAIN ANALYZE queries + // TODO: check locking behaviour below + if (profiler.IsEnabled()) { + Value result; + if (!context.TryGetCurrentSetting("delta_scan_explain_files_filtered", result)) { + throw InternalException("Failed to find 'delta_scan_explain_files_filtered' option!"); + } else if (result.GetValue()) { + auto old_total = GetTotalFileCount(); + auto new_total = filtered_list->GetTotalFileCount(); + + if (old_total != new_total) { + string filters_info; + bool first_item = true; + for (auto &f : filtered_list->table_filters.filters) { + auto &column_index = f.first; + auto &filter = f.second; + if (column_index < names.size()) { + if (!first_item) { + filters_info += "\n"; + } + first_item = false; + auto &col_name = names[column_index]; + filters_info += filter->ToString(col_name); + } + } + + info.extra_info.file_filters = filters_info; + } + + if (!info.extra_info.total_files.IsValid()) { + info.extra_info.total_files = old_total; + } else if (info.extra_info.total_files.GetIndex() < old_total) { + throw InternalException( + "Error encountered when analyzing filtered out files for delta scan: total_files inconsistent!"); + } + + if (!info.extra_info.filtered_files.IsValid() || info.extra_info.filtered_files.GetIndex() >= new_total) { + info.extra_info.filtered_files = new_total; + } else { + throw InternalException( + "Error encountered when analyzing filtered out files for delta scan: filtered_files inconsistent!"); + } + } + } + return std::move(filtered_list); } vector DeltaSnapshot::GetAllFiles() { + unique_lock lck(lock); idx_t i = resolved_files.size(); // TODO: this can probably be improved - while (!GetFile(i).empty()) { + while (!GetFileInternal(i).empty()) { i++; } return resolved_files; } FileExpandResult DeltaSnapshot::GetExpandResult() { - // GetFile(1) will ensure at least the first 2 files are expanded if they are available - GetFile(1); - - if (resolved_files.size() > 1) { - return FileExpandResult::MULTIPLE_FILES; - } else if (resolved_files.size() == 1) { - return FileExpandResult::SINGLE_FILE; - } - - return FileExpandResult::NO_FILES; + // We avoid exposing the ExpandResult to DuckDB here because we want to materialize the Snapshot as late as + // possible: materializing too early (GetExpandResult is called *before* filter pushdown by the Parquet scanner), + // will lead into needing to create 2 scans of the snapshot TODO: we need to investigate if this is actually a + // sensible decision with some benchmarking, its currently based on intuition. + return FileExpandResult::MULTIPLE_FILES; } idx_t DeltaSnapshot::GetTotalFileCount() { - // TODO: this can probably be improved + unique_lock lck(lock); idx_t i = resolved_files.size(); - while (!GetFile(i).empty()) { + while (!GetFileInternal(i).empty()) { i++; } return resolved_files.size(); @@ -534,6 +625,9 @@ unique_ptr DeltaSnapshot::GetCardinality(ClientContext &context) // This also ensures all files are expanded auto total_file_count = DeltaSnapshot::GetTotalFileCount(); + // TODO: internalize above + unique_lock lck(lock); + if (total_file_count == 0) { return make_uniq(0, 0); } @@ -554,8 +648,24 @@ unique_ptr DeltaSnapshot::GetCardinality(ClientContext &context) return nullptr; } -unique_ptr DeltaMultiFileReader::CreateInstance() { - return std::move(make_uniq()); +idx_t DeltaSnapshot::GetVersion() { + unique_lock lck(lock); + return version; +} + +DeltaFileMetaData &DeltaSnapshot::GetMetaData(idx_t index) const { + unique_lock lck(lock); + return *metadata[index]; +} + +unique_ptr DeltaMultiFileReader::CreateInstance(const TableFunction &table_function) { + auto result = make_uniq(); + + if (table_function.function_info) { + result->snapshot = table_function.function_info->Cast().snapshot; + } + + return std::move(result); } bool DeltaMultiFileReader::Bind(MultiFileReaderOptions &options, MultiFileList &files, @@ -602,9 +712,9 @@ void DeltaMultiFileReader::BindOptions(MultiFileReaderOptions &options, MultiFil void DeltaMultiFileReader::FinalizeBind(const MultiFileReaderOptions &file_options, const MultiFileReaderBindData &options, const string &filename, const vector &local_names, const vector &global_types, - const vector &global_names, const vector &global_column_ids, - MultiFileReaderData &reader_data, ClientContext &context, - optional_ptr global_state) { + const vector &global_names, + const vector &global_column_ids, MultiFileReaderData &reader_data, + ClientContext &context, optional_ptr global_state) { MultiFileReader::FinalizeBind(file_options, options, filename, local_names, global_types, global_names, global_column_ids, reader_data, context, global_state); @@ -626,16 +736,16 @@ void DeltaMultiFileReader::FinalizeBind(const MultiFileReaderOptions &file_optio // Get the metadata for this file D_ASSERT(global_state->file_list); const auto &snapshot = dynamic_cast(*global_state->file_list); - auto &file_metadata = snapshot.metadata[reader_data.file_list_idx.GetIndex()]; + auto &file_metadata = snapshot.GetMetaData(reader_data.file_list_idx.GetIndex()); - if (!file_metadata->partition_map.empty()) { + if (!file_metadata.partition_map.empty()) { for (idx_t i = 0; i < global_column_ids.size(); i++) { - column_t col_id = global_column_ids[i]; + column_t col_id = global_column_ids[i].GetPrimaryIndex(); if (IsRowIdColumnId(col_id)) { continue; } - auto col_partition_entry = file_metadata->partition_map.find(global_names[col_id]); - if (col_partition_entry != file_metadata->partition_map.end()) { + auto col_partition_entry = file_metadata.partition_map.find(global_names[col_id]); + if (col_partition_entry != file_metadata.partition_map.end()) { auto ¤t_type = global_types[col_id]; if (current_type == LogicalType::BLOB) { reader_data.constant_map.emplace_back(i, Value::BLOB_RAW(col_partition_entry->second)); @@ -648,12 +758,20 @@ void DeltaMultiFileReader::FinalizeBind(const MultiFileReaderOptions &file_optio } } -unique_ptr DeltaMultiFileReader::CreateFileList(ClientContext &context, const vector &paths, +shared_ptr DeltaMultiFileReader::CreateFileList(ClientContext &context, const vector &paths, FileGlobOptions options) { if (paths.size() != 1) { throw BinderException("'delta_scan' only supports single path as input"); } + if (snapshot) { + // TODO: assert that we are querying the same path as this injected snapshot + // This takes the kernel snapshot from the delta snapshot and ensures we use that snapshot for reading + if (snapshot) { + return snapshot; + } + } + return make_uniq(context, paths[0]); } @@ -672,7 +790,6 @@ static SelectionVector DuckSVFromDeltaSV(const ffi::KernelBoolSlice &dv, Vector for (idx_t i = 0; i < count; i++) { auto row_id = row_ids[data.sel->get_index(i)]; - // TODO: why are deletion vectors not spanning whole data? if (row_id >= dv.len || dv.ptr[row_id]) { result.data()[current_select] = i; current_select++; @@ -700,14 +817,14 @@ unique_ptr DeltaMultiFileReader::InitializeGlobalSta duckdb::ClientContext &context, const duckdb::MultiFileReaderOptions &file_options, const duckdb::MultiFileReaderBindData &bind_data, const duckdb::MultiFileList &file_list, const vector &global_types, const vector &global_names, - const vector &global_column_ids) { + const vector &global_column_ids) { vector extra_columns; vector> mapped_columns; // Create a map of the columns that are in the projection case_insensitive_map_t selected_columns; for (idx_t i = 0; i < global_column_ids.size(); i++) { - auto global_id = global_column_ids[i]; + auto global_id = global_column_ids[i].GetPrimaryIndex(); if (IsRowIdColumnId(global_id)) { continue; } @@ -766,7 +883,7 @@ unique_ptr DeltaMultiFileReader::InitializeGlobalSta // in the parquet files, we just add null constant columns static void CustomMulfiFileNameMapping(const string &file_name, const vector &local_types, const vector &local_names, const vector &global_types, - const vector &global_names, const vector &global_column_ids, + const vector &global_names, const vector &global_column_ids, MultiFileReaderData &reader_data, const string &initial_file, optional_ptr global_state) { D_ASSERT(global_types.size() == global_names.size()); @@ -790,7 +907,7 @@ static void CustomMulfiFileNameMapping(const string &file_name, const vector= global_types.size()) { throw InternalException( "MultiFileReader::CreatePositionalMapping - global_id is out of range in global_types for this file"); @@ -831,7 +948,7 @@ static void CustomMulfiFileNameMapping(const string &file_name, const vector &local_types, const vector &local_names, const vector &global_types, const vector &global_names, - const vector &global_column_ids, + const vector &global_column_ids, MultiFileReaderData &reader_data, const string &initial_file, optional_ptr global_state) { // First call the base implementation to do most mapping @@ -879,15 +996,15 @@ void DeltaMultiFileReader::FinalizeChunk(ClientContext &context, const MultiFile // Get the metadata for this file const auto &snapshot = dynamic_cast(*global_state->file_list); - auto &metadata = snapshot.metadata[reader_data.file_list_idx.GetIndex()]; + auto &metadata = snapshot.GetMetaData(reader_data.file_list_idx.GetIndex()); - if (metadata->selection_vector.ptr && chunk.size() != 0) { + if (metadata.selection_vector.ptr && chunk.size() != 0) { D_ASSERT(delta_global_state.file_row_number_idx != DConstants::INVALID_INDEX); auto &file_row_number_column = chunk.data[delta_global_state.file_row_number_idx]; // Construct the selection vector using the file_row_number column and the raw selection vector from delta idx_t select_count; - auto sv = DuckSVFromDeltaSV(metadata->selection_vector, file_row_number_column, chunk.size(), select_count); + auto sv = DuckSVFromDeltaSV(metadata.selection_vector, file_row_number_column, chunk.size(), select_count); chunk.Slice(sv, select_count); } @@ -931,11 +1048,17 @@ bool DeltaMultiFileReader::ParseOption(const string &key, const Value &val, Mult return MultiFileReader::ParseOption(key, val, options, context); } -// -// DeltaMultiFileReaderBindData::DeltaMultiFileReaderBindData(DeltaSnapshot & delta_snapshot): -// current_snapshot(delta_snapshot){ -// -//} + +static InsertionOrderPreservingMap DeltaFunctionToString(TableFunctionToStringInput &input) { + InsertionOrderPreservingMap result; + + if (input.table_function.function_info) { + auto &table_info = input.table_function.function_info->Cast(); + result["Table"] = table_info.table_name; + } + + return result; +} TableFunctionSet DeltaFunctions::GetDeltaScanFunction(DatabaseInstance &instance) { // Parquet extension needs to be loaded for this to make sense @@ -958,6 +1081,8 @@ TableFunctionSet DeltaFunctions::GetDeltaScanFunction(DatabaseInstance &instance function.table_scan_progress = nullptr; function.get_bind_info = nullptr; + function.to_string = DeltaFunctionToString; + // Schema param is just confusing here function.named_parameters.erase("schema"); diff --git a/src/functions/expression_functions.cpp b/src/functions/expression_functions.cpp new file mode 100644 index 0000000..373e42f --- /dev/null +++ b/src/functions/expression_functions.cpp @@ -0,0 +1,46 @@ +#include +#include + +#include "duckdb/function/scalar_function.hpp" +#include "duckdb/planner/expression/bound_constant_expression.hpp" + +#include "delta_utils.hpp" +#include "delta_functions.hpp" + +namespace duckdb { + +static void GetDeltaTestExpression(DataChunk &input, ExpressionState &state, Vector &output) { + output.SetVectorType(VectorType::CONSTANT_VECTOR); + + auto test_expression = ffi::get_testing_kernel_expression(); + ExpressionVisitor visitor; + + auto result = visitor.VisitKernelExpression(&test_expression); + if (result->size() != 1) { + throw InternalException("Unexpected result: expected single expression"); + } + + auto &expr = result->back(); + if (expr->GetExpressionType() != ExpressionType::CONJUNCTION_AND) { + throw InternalException("Unexpected result: expected single top level Conjuntion"); + } + + vector result_to_string; + for (auto &expr : expr->Cast().children) { + result_to_string.push_back(expr->ToString()); + } + + output.SetValue(0, Value::LIST(result_to_string)); +}; + +ScalarFunctionSet DeltaFunctions::GetExpressionFunction(DatabaseInstance &instance) { + ScalarFunctionSet result; + result.name = "get_delta_test_expression"; + + ScalarFunction getvar({}, LogicalType::LIST(LogicalType::VARCHAR), GetDeltaTestExpression, nullptr, nullptr); + result.AddFunction(getvar); + + return result; +} + +} // namespace duckdb \ No newline at end of file diff --git a/src/include/delta_extension.hpp b/src/include/delta_extension.hpp index d6b13f2..89fbc2d 100644 --- a/src/include/delta_extension.hpp +++ b/src/include/delta_extension.hpp @@ -2,6 +2,8 @@ #include "duckdb.hpp" +#define DEFAULT_DELTA_TABLE "delta_table" + namespace duckdb { class DeltaExtension : public Extension { diff --git a/src/include/delta_functions.hpp b/src/include/delta_functions.hpp index 4f819cb..0753551 100644 --- a/src/include/delta_functions.hpp +++ b/src/include/delta_functions.hpp @@ -15,8 +15,13 @@ namespace duckdb { class DeltaFunctions { public: static vector GetTableFunctions(DatabaseInstance &instance); + static vector GetScalarFunctions(DatabaseInstance &instance); private: + //! Table Functions static TableFunctionSet GetDeltaScanFunction(DatabaseInstance &instance); + + //! Scalar Functions + static ScalarFunctionSet GetExpressionFunction(DatabaseInstance &instance); }; } // namespace duckdb diff --git a/src/include/delta_kernel_ffi.hpp b/src/include/delta_kernel_ffi.hpp index 6f1401e..5bb6cae 100644 --- a/src/include/delta_kernel_ffi.hpp +++ b/src/include/delta_kernel_ffi.hpp @@ -3,8 +3,8 @@ #include #include #include -#include #include +#include namespace ffi { @@ -40,6 +40,7 @@ enum class KernelError { MalformedJsonError, MissingMetadataError, MissingProtocolError, + InvalidProtocolError, MissingMetadataAndProtocolError, ParseError, JoinFailureError, @@ -52,6 +53,56 @@ enum class KernelError { InternalError, InvalidExpression, InvalidLogPath, + InvalidCommitInfo, + FileAlreadyExists, + MissingCommitInfo, + UnsupportedError, + ParseIntervalError, + ChangeDataFeedUnsupported, + ChangeDataFeedIncompatibleSchema, + InvalidCheckpoint, +}; + +/// Definitions of level verbosity. Verbose Levels are "greater than" less verbose ones. So +/// Level::ERROR is the lowest, and Level::TRACE the highest. +enum class Level { + ERROR = 0, + WARN = 1, + INFO = 2, + DEBUGGING = 3, + TRACE = 4, +}; + +/// Format to use for log lines. These correspond to the formats from [`tracing_subscriber` +/// formats](https://docs.rs/tracing-subscriber/latest/tracing_subscriber/fmt/format/index.html). +enum class LogLineFormat { + /// The default formatter. This emits human-readable, single-line logs for each event that + /// occurs, with the context displayed before the formatted representation of the event. + /// Example: + /// `2022-02-15T18:40:14.289898Z INFO fmt: preparing to shave yaks number_of_yaks=3` + FULL, + /// A variant of the FULL formatter, optimized for short line lengths. Fields from the context + /// are appended to the fields of the formatted event, and targets are not shown. + /// Example: + /// `2022-02-17T19:51:05.809287Z INFO fmt_compact: preparing to shave yaks number_of_yaks=3` + COMPACT, + /// Emits excessively pretty, multi-line logs, optimized for human readability. This is + /// primarily intended to be used in local development and debugging, or for command-line + /// applications, where automated analysis and compact storage of logs is less of a priority + /// than readability and visual appeal. + /// Example: + /// ```ignore + /// 2022-02-15T18:44:24.535324Z INFO fmt_pretty: preparing to shave yaks, number_of_yaks: 3 + /// at examples/examples/fmt-pretty.rs:16 on main + /// ``` + PRETTY, + /// Outputs newline-delimited JSON logs. This is intended for production use with systems where + /// structured logs are consumed as JSON by analysis and viewing tools. The JSON output is not + /// optimized for human readability. + /// Example: + /// `{"timestamp":"2022-02-15T18:47:10.821315Z","level":"INFO","fields":{"message":"preparing to shave + /// yaks","number_of_yaks":3},"target":"fmt_json"}` + JSON, }; struct CStringMap; @@ -73,6 +124,8 @@ struct ExclusiveFileReadResultIterator; struct KernelExpressionVisitorState; +struct SharedExpression; + struct SharedExternEngine; struct SharedGlobalScanState; @@ -179,19 +232,20 @@ struct ExternResult { /// Intentionally not Copy, Clone, Send, nor Sync. /// /// Whoever instantiates the struct must ensure it does not outlive the data it points to. The -/// compiler cannot help us here, because raw pointers don't have lifetimes. To reduce the risk of -/// accidental misuse, it is recommended to only instantiate this struct as a function arg, by -/// converting a string slice `Into` a `KernelStringSlice`. That way, the borrowed reference at call -/// site protects the `KernelStringSlice` until the function returns. Meanwhile, the callee should -/// assume that the slice is only valid until the function returns, and must not retain any -/// references to the slice or its data that could outlive the function call. -/// -/// ``` -/// # use delta_kernel_ffi::KernelStringSlice; -/// fn wants_slice(slice: KernelStringSlice) { } -/// let msg = String::from("hello"); -/// wants_slice(msg.into()); +/// compiler cannot help us here, because raw pointers don't have lifetimes. A good rule of thumb is +/// to always use the [`kernel_string_slice`] macro to create string slices, and to avoid returning +/// a string slice from a code block or function (since the move risks over-extending its lifetime): +/// +/// ```ignore +/// # // Ignored because this code is pub(crate) and doc tests cannot compile it +/// let dangling_slice = { +/// let tmp = String::from("tmp"); +/// kernel_string_slice!(tmp) +/// } /// ``` +/// +/// Meanwhile, the callee must assume that the slice is only valid until the function returns, and +/// must not retain any references to the slice or its data that might outlive the function call. struct KernelStringSlice { const char *ptr; uintptr_t len; @@ -205,22 +259,6 @@ using NullableCvoid = void *; /// function is that `kernel_str` is _only_ valid until the return from this function using AllocateStringFn = NullableCvoid (*)(KernelStringSlice kernel_str); -struct FileMeta { - KernelStringSlice path; - int64_t last_modified; - uintptr_t size; -}; - -/// Model iterators. This allows an engine to specify iteration however it likes, and we simply wrap -/// the engine functions. The engine retains ownership of the iterator. -struct EngineIterator { - void *data; - /// A function that should advance the iterator and return the next time from the data - /// If the iterator is complete, it should return null. It should be safe to - /// call `get_next()` multiple times if it returns null. - const void *(*get_next)(void *data); -}; - /// ABI-compatible struct for ArrowArray from C Data Interface /// See /// @@ -278,6 +316,201 @@ struct ArrowFFIData { }; #endif +struct FileMeta { + KernelStringSlice path; + int64_t last_modified; + uintptr_t size; +}; + +/// Model iterators. This allows an engine to specify iteration however it likes, and we simply wrap +/// the engine functions. The engine retains ownership of the iterator. +struct EngineIterator { + void *data; + /// A function that should advance the iterator and return the next time from the data + /// If the iterator is complete, it should return null. It should be safe to + /// call `get_next()` multiple times if it returns null. + const void *(*get_next)(void *data); +}; + +template +using VisitLiteralFn = void (*)(void *data, uintptr_t sibling_list_id, T value); + +using VisitVariadicFn = void (*)(void *data, uintptr_t sibling_list_id, uintptr_t child_list_id); + +using VisitUnaryFn = void (*)(void *data, uintptr_t sibling_list_id, uintptr_t child_list_id); + +using VisitBinaryOpFn = void (*)(void *data, uintptr_t sibling_list_id, uintptr_t child_list_id); + +/// The [`EngineExpressionVisitor`] defines a visitor system to allow engines to build their own +/// representation of a kernel expression. +/// +/// The model is list based. When the kernel needs a list, it will ask engine to allocate one of a +/// particular size. Once allocated the engine returns an `id`, which can be any integer identifier +/// ([`usize`]) the engine wants, and will be passed back to the engine to identify the list in the +/// future. +/// +/// Every expression the kernel visits belongs to some list of "sibling" elements. The schema +/// itself is a list of schema elements, and every complex type (struct expression, array, variadic, etc) +/// contains a list of "child" elements. +/// 1. Before visiting any complex expression type, the kernel asks the engine to allocate a list to +/// hold its children +/// 2. When visiting any expression element, the kernel passes its parent's "child list" as the +/// "sibling list" the element should be appended to: +/// - For a struct literal, first visit each struct field and visit each value +/// - For a struct expression, visit each sub expression. +/// - For an array literal, visit each of the elements. +/// - For a variadic `and` or `or` expression, visit each sub-expression. +/// - For a binary operator expression, visit the left and right operands. +/// - For a unary `is null` or `not` expression, visit the sub-expression. +/// 3. When visiting a complex expression, the kernel also passes the "child list" containing +/// that element's (already-visited) children. +/// 4. The [`visit_expression`] method returns the id of the list of top-level columns +/// +/// WARNING: The visitor MUST NOT retain internal references to string slices or binary data passed +/// to visitor methods +/// TODO: Visit type information in struct field and null. This will likely involve using the schema +/// visitor. Note that struct literals are currently in flux, and may change significantly. Here is the relevant +/// issue: https://github.com/delta-io/delta-kernel-rs/issues/412 +struct EngineExpressionVisitor { + /// An opaque engine state pointer + void *data; + /// Creates a new expression list, optionally reserving capacity up front + uintptr_t (*make_field_list)(void *data, uintptr_t reserve); + /// Visit a 32bit `integer` belonging to the list identified by `sibling_list_id`. + VisitLiteralFn visit_literal_int; + /// Visit a 64bit `long` belonging to the list identified by `sibling_list_id`. + VisitLiteralFn visit_literal_long; + /// Visit a 16bit `short` belonging to the list identified by `sibling_list_id`. + VisitLiteralFn visit_literal_short; + /// Visit an 8bit `byte` belonging to the list identified by `sibling_list_id`. + VisitLiteralFn visit_literal_byte; + /// Visit a 32bit `float` belonging to the list identified by `sibling_list_id`. + VisitLiteralFn visit_literal_float; + /// Visit a 64bit `double` belonging to the list identified by `sibling_list_id`. + VisitLiteralFn visit_literal_double; + /// Visit a `string` belonging to the list identified by `sibling_list_id`. + VisitLiteralFn visit_literal_string; + /// Visit a `boolean` belonging to the list identified by `sibling_list_id`. + VisitLiteralFn visit_literal_bool; + /// Visit a 64bit timestamp belonging to the list identified by `sibling_list_id`. + /// The timestamp is microsecond precision and adjusted to UTC. + VisitLiteralFn visit_literal_timestamp; + /// Visit a 64bit timestamp belonging to the list identified by `sibling_list_id`. + /// The timestamp is microsecond precision with no timezone. + VisitLiteralFn visit_literal_timestamp_ntz; + /// Visit a 32bit intger `date` representing days since UNIX epoch 1970-01-01. The `date` belongs + /// to the list identified by `sibling_list_id`. + VisitLiteralFn visit_literal_date; + /// Visit binary data at the `buffer` with length `len` belonging to the list identified by + /// `sibling_list_id`. + void (*visit_literal_binary)(void *data, uintptr_t sibling_list_id, const uint8_t *buffer, uintptr_t len); + /// Visit a 128bit `decimal` value with the given precision and scale. The 128bit integer + /// is split into the most significant 64 bits in `value_ms`, and the least significant 64 + /// bits in `value_ls`. The `decimal` belongs to the list identified by `sibling_list_id`. + void (*visit_literal_decimal)(void *data, uintptr_t sibling_list_id, uint64_t value_ms, uint64_t value_ls, + uint8_t precision, uint8_t scale); + /// Visit a struct literal belonging to the list identified by `sibling_list_id`. + /// The field names of the struct are in a list identified by `child_field_list_id`. + /// The values of the struct are in a list identified by `child_value_list_id`. + void (*visit_literal_struct)(void *data, uintptr_t sibling_list_id, uintptr_t child_field_list_id, + uintptr_t child_value_list_id); + /// Visit an array literal belonging to the list identified by `sibling_list_id`. + /// The values of the array are in a list identified by `child_list_id`. + void (*visit_literal_array)(void *data, uintptr_t sibling_list_id, uintptr_t child_list_id); + /// Visits a null value belonging to the list identified by `sibling_list_id. + void (*visit_literal_null)(void *data, uintptr_t sibling_list_id); + /// Visits an `and` expression belonging to the list identified by `sibling_list_id`. + /// The sub-expressions of the array are in a list identified by `child_list_id` + VisitVariadicFn visit_and; + /// Visits an `or` expression belonging to the list identified by `sibling_list_id`. + /// The sub-expressions of the array are in a list identified by `child_list_id` + VisitVariadicFn visit_or; + /// Visits a `not` expression belonging to the list identified by `sibling_list_id`. + /// The sub-expression will be in a _one_ item list identified by `child_list_id` + VisitUnaryFn visit_not; + /// Visits a `is_null` expression belonging to the list identified by `sibling_list_id`. + /// The sub-expression will be in a _one_ item list identified by `child_list_id` + VisitUnaryFn visit_is_null; + /// Visits the `LessThan` binary operator belonging to the list identified by `sibling_list_id`. + /// The operands will be in a _two_ item list identified by `child_list_id` + VisitBinaryOpFn visit_lt; + /// Visits the `LessThanOrEqual` binary operator belonging to the list identified by `sibling_list_id`. + /// The operands will be in a _two_ item list identified by `child_list_id` + VisitBinaryOpFn visit_le; + /// Visits the `GreaterThan` binary operator belonging to the list identified by `sibling_list_id`. + /// The operands will be in a _two_ item list identified by `child_list_id` + VisitBinaryOpFn visit_gt; + /// Visits the `GreaterThanOrEqual` binary operator belonging to the list identified by `sibling_list_id`. + /// The operands will be in a _two_ item list identified by `child_list_id` + VisitBinaryOpFn visit_ge; + /// Visits the `Equal` binary operator belonging to the list identified by `sibling_list_id`. + /// The operands will be in a _two_ item list identified by `child_list_id` + VisitBinaryOpFn visit_eq; + /// Visits the `NotEqual` binary operator belonging to the list identified by `sibling_list_id`. + /// The operands will be in a _two_ item list identified by `child_list_id` + VisitBinaryOpFn visit_ne; + /// Visits the `Distinct` binary operator belonging to the list identified by `sibling_list_id`. + /// The operands will be in a _two_ item list identified by `child_list_id` + VisitBinaryOpFn visit_distinct; + /// Visits the `In` binary operator belonging to the list identified by `sibling_list_id`. + /// The operands will be in a _two_ item list identified by `child_list_id` + VisitBinaryOpFn visit_in; + /// Visits the `NotIn` binary operator belonging to the list identified by `sibling_list_id`. + /// The operands will be in a _two_ item list identified by `child_list_id` + VisitBinaryOpFn visit_not_in; + /// Visits the `Add` binary operator belonging to the list identified by `sibling_list_id`. + /// The operands will be in a _two_ item list identified by `child_list_id` + VisitBinaryOpFn visit_add; + /// Visits the `Minus` binary operator belonging to the list identified by `sibling_list_id`. + /// The operands will be in a _two_ item list identified by `child_list_id` + VisitBinaryOpFn visit_minus; + /// Visits the `Multiply` binary operator belonging to the list identified by `sibling_list_id`. + /// The operands will be in a _two_ item list identified by `child_list_id` + VisitBinaryOpFn visit_multiply; + /// Visits the `Divide` binary operator belonging to the list identified by `sibling_list_id`. + /// The operands will be in a _two_ item list identified by `child_list_id` + VisitBinaryOpFn visit_divide; + /// Visits the `column` belonging to the list identified by `sibling_list_id`. + void (*visit_column)(void *data, uintptr_t sibling_list_id, KernelStringSlice name); + /// Visits a `StructExpression` belonging to the list identified by `sibling_list_id`. + /// The sub-expressions of the `StructExpression` are in a list identified by `child_list_id` + void (*visit_struct_expr)(void *data, uintptr_t sibling_list_id, uintptr_t child_list_id); +}; + +// This trickery is from https://github.com/mozilla/cbindgen/issues/402#issuecomment-578680163 +struct im_an_unused_struct_that_tricks_msvc_into_compilation { + ExternResult field; + ExternResult field2; + ExternResult field3; + ExternResult> field4; + ExternResult> field5; + ExternResult field6; + ExternResult field7; + ExternResult> field8; + ExternResult> field9; + ExternResult> field10; + ExternResult field11; +}; + +/// An `Event` can generally be thought of a "log message". It contains all the relevant bits such +/// that an engine can generate a log message in its format +struct Event { + /// The log message associated with the event + KernelStringSlice message; + /// Level that the event was emitted at + Level level; + /// A string that specifies in what part of the system the event occurred + KernelStringSlice target; + /// source file line number where the event occurred, or 0 (zero) if unknown + uint32_t line; + /// file where the event occurred. If unknown the slice `ptr` will be null and the len will be 0 + KernelStringSlice file; +}; + +using TracingEventFn = void (*)(Event event); + +using TracingLogLineFn = void (*)(KernelStringSlice line); + /// A predicate that can be used to skip data when scanning. /// /// When invoking [`scan::scan`], The engine provides a pointer to the (engine's native) predicate, @@ -305,21 +538,6 @@ struct Stats { using CScanCallback = void (*)(NullableCvoid engine_context, KernelStringSlice path, int64_t size, const Stats *stats, const DvInfo *dv_info, const CStringMap *partition_map); -// This trickery is from https://github.com/mozilla/cbindgen/issues/402#issuecomment-578680163 -struct im_an_unused_struct_that_tricks_msvc_into_compilation { - ExternResult field; - ExternResult field2; - ExternResult field3; - ExternResult> field4; - ExternResult> field5; - ExternResult field6; - ExternResult field7; - ExternResult> field8; - ExternResult> field9; - ExternResult> field10; - ExternResult field11; -}; - /// The `EngineSchemaVisitor` defines a visitor system to allow engines to build their own /// representation of a schema from a particular schema within kernel. /// @@ -498,6 +716,32 @@ bool string_slice_next(Handle data, NullableCvoid engine_co /// Caller is responsible for (at most once) passing a valid pointer to a [`StringSliceIterator`] void free_string_slice_data(Handle data); +/// Get the number of rows in an engine data +/// +/// # Safety +/// `data_handle` must be a valid pointer to a kernel allocated `ExclusiveEngineData` +uintptr_t engine_data_length(Handle *data); + +/// Allow an engine to "unwrap" an [`ExclusiveEngineData`] into the raw pointer for the case it wants +/// to use its own engine data format +/// +/// # Safety +/// +/// `data_handle` must be a valid pointer to a kernel allocated `ExclusiveEngineData`. The Engine must +/// ensure the handle outlives the returned pointer. +void *get_raw_engine_data(Handle data); + +#if defined(DEFINE_DEFAULT_ENGINE) +/// Get an [`ArrowFFIData`] to allow binding to the arrow [C Data +/// Interface](https://arrow.apache.org/docs/format/CDataInterface.html). This includes the data and +/// the schema. If this function returns an `Ok` variant the _engine_ must free the returned struct. +/// +/// # Safety +/// data_handle must be a valid ExclusiveEngineData as read by the +/// [`delta_kernel::engine::default::DefaultEngine`] obtained from `get_default_engine`. +ExternResult get_raw_arrow_data(Handle data, Handle engine); +#endif + /// Call the engine back with the next `EngingeData` batch read by Parquet/Json handler. The /// _engine_ "owns" the data that is passed into the `engine_visitor`, since it is allocated by the /// `Engine` being used for log-replay. If the engine wants the kernel to free this data, it _must_ @@ -565,38 +809,101 @@ uintptr_t visit_expression_literal_double(KernelExpressionVisitorState *state, d uintptr_t visit_expression_literal_bool(KernelExpressionVisitorState *state, bool value); -/// Get the number of rows in an engine data +/// Free the memory the passed SharedExpression /// /// # Safety -/// `data_handle` must be a valid pointer to a kernel allocated `ExclusiveEngineData` -uintptr_t engine_data_length(Handle *data); +/// Engine is responsible for passing a valid SharedExpression +void free_kernel_predicate(Handle data); -/// Allow an engine to "unwrap" an [`ExclusiveEngineData`] into the raw pointer for the case it wants -/// to use its own engine data format +/// Visit the expression of the passed [`SharedExpression`] Handle using the provided `visitor`. +/// See the documentation of [`EngineExpressionVisitor`] for a description of how this visitor +/// works. +/// +/// This method returns the id that the engine generated for the top level expression /// /// # Safety /// -/// `data_handle` must be a valid pointer to a kernel allocated `ExclusiveEngineData`. The Engine must -/// ensure the handle outlives the returned pointer. -void *get_raw_engine_data(Handle data); +/// The caller must pass a valid SharedExpression Handle and expression visitor +uintptr_t visit_expression(const Handle *expression, EngineExpressionVisitor *visitor); -#if defined(DEFINE_DEFAULT_ENGINE) -/// Get an [`ArrowFFIData`] to allow binding to the arrow [C Data -/// Interface](https://arrow.apache.org/docs/format/CDataInterface.html). This includes the data and -/// the schema. +/// Enable getting called back for tracing (logging) events in the kernel. `max_level` specifies +/// that only events `<=` to the specified level should be reported. More verbose Levels are "greater +/// than" less verbose ones. So Level::ERROR is the lowest, and Level::TRACE the highest. +/// +/// Note that setting up such a call back can only be done ONCE. Calling any of +/// `enable_event_tracing`, `enable_log_line_tracing`, or `enable_formatted_log_line_tracing` more +/// than once is a no-op. +/// +/// Returns `true` if the callback was setup successfully, false on failure (i.e. if called a second +/// time) +/// +/// [`event`] based tracing gives an engine maximal flexibility in formatting event log +/// lines. Kernel can also format events for the engine. If this is desired call +/// [`enable_log_line_tracing`] instead of this method. /// /// # Safety -/// data_handle must be a valid ExclusiveEngineData as read by the -/// [`delta_kernel::engine::default::DefaultEngine`] obtained from `get_default_engine`. -ExternResult get_raw_arrow_data(Handle data, Handle engine); -#endif +/// Caller must pass a valid function pointer for the callback +bool enable_event_tracing(TracingEventFn callback, Level max_level); + +/// Enable getting called back with log lines in the kernel using default settings: +/// - FULL format +/// - include ansi color +/// - include timestamps +/// - include level +/// - include target +/// +/// `max_level` specifies that only logs `<=` to the specified level should be reported. More +/// verbose Levels are "greater than" less verbose ones. So Level::ERROR is the lowest, and +/// Level::TRACE the highest. +/// +/// Log lines passed to the callback will already have a newline at the end. +/// +/// Note that setting up such a call back can only be done ONCE. Calling any of +/// `enable_event_tracing`, `enable_log_line_tracing`, or `enable_formatted_log_line_tracing` more +/// than once is a no-op. +/// +/// Returns `true` if the callback was setup successfully, false on failure (i.e. if called a second +/// time) +/// +/// Log line based tracing is simple for an engine as it can just log the passed string, but does +/// not provide flexibility for an engine to format events. If the engine wants to use a specific +/// format for events it should call [`enable_event_tracing`] instead of this function. +/// +/// # Safety +/// Caller must pass a valid function pointer for the callback +bool enable_log_line_tracing(TracingLogLineFn callback, Level max_level); + +/// Enable getting called back with log lines in the kernel. This variant allows specifying +/// formatting options for the log lines. See [`enable_log_line_tracing`] for general info on +/// getting called back for log lines. +/// +/// Note that setting up such a call back can only be done ONCE. Calling any of +/// `enable_event_tracing`, `enable_log_line_tracing`, or `enable_formatted_log_line_tracing` more +/// than once is a no-op. +/// +/// Returns `true` if the callback was setup successfully, false on failure (i.e. if called a second +/// time) +/// +/// Options that can be set: +/// - `format`: see [`LogLineFormat`] +/// - `ansi`: should the formatter use ansi escapes for color +/// - `with_time`: should the formatter include a timestamp in the log message +/// - `with_level`: should the formatter include the level in the log message +/// - `with_target`: should the formatter include what part of the system the event occurred +/// +/// # Safety +/// Caller must pass a valid function pointer for the callback +bool enable_formatted_log_line_tracing(TracingLogLineFn callback, Level max_level, LogLineFormat format, bool ansi, + bool with_time, bool with_level, bool with_target); /// Drops a scan. /// # Safety /// Caller is responsible for passing a [valid][Handle#Validity] scan handle. void free_scan(Handle scan); -/// Get a [`Scan`] over the table specified by the passed snapshot. +/// Get a [`Scan`] over the table specified by the passed snapshot. It is the responsibility of the +/// _engine_ to free this scan when complete by calling [`free_scan`]. +/// /// # Safety /// /// Caller is responsible for passing a valid snapshot pointer, and engine pointer @@ -650,6 +957,10 @@ void free_global_scan_state(Handle state); ExternResult> kernel_scan_data_init(Handle engine, Handle scan); +/// Call the provided `engine_visitor` on the next scan data item. The visitor will be provided with +/// a selection vector and engine data. It is the responsibility of the _engine_ to free these when +/// it is finished by calling [`free_bool_slice`] and [`free_engine_data`] respectively. +/// /// # Safety /// /// The iterator must be valid (returned by [kernel_scan_data_init]) and not yet freed by @@ -706,6 +1017,14 @@ void visit_scan_data(Handle data, KernelBoolSlice selection /// Caller is responsible for passing a valid snapshot handle and schema visitor. uintptr_t visit_schema(Handle snapshot, EngineSchemaVisitor *visitor); +/// Constructs a kernel expression that is passed back as a SharedExpression handle. The expected +/// output expression can be found in `ffi/tests/test_expression_visitor/expected.txt`. +/// +/// # Safety +/// The caller is responsible for freeing the retured memory, either by calling +/// [`free_kernel_predicate`], or [`Handle::drop_handle`] +Handle get_testing_kernel_expression(); + } // extern "C" } // namespace ffi diff --git a/src/include/delta_utils.hpp b/src/include/delta_utils.hpp index 23b87f4..5bf4e1d 100644 --- a/src/include/delta_utils.hpp +++ b/src/include/delta_utils.hpp @@ -4,13 +4,130 @@ #include "duckdb/common/enum_util.hpp" #include "duckdb/planner/filter/conjunction_filter.hpp" #include "duckdb/planner/filter/constant_filter.hpp" - +#include "duckdb/planner/expression.hpp" +#include "duckdb/parser/expression/constant_expression.hpp" +#include "duckdb/parser/expression/conjunction_expression.hpp" +#include "duckdb/common/error_data.hpp" +#include "duckdb/parser/expression/comparison_expression.hpp" #include #include // TODO: clean up this file as we go namespace duckdb { +class DatabaseInstance; + +class ExpressionVisitor : public ffi::EngineExpressionVisitor { + using FieldList = vector>; + +public: + unique_ptr>> + VisitKernelExpression(const ffi::Handle *expression); + +private: + unordered_map> inflight_lists; + uintptr_t next_id = 1; + + ErrorData error; + + // Literals + template + static ffi::VisitLiteralFn VisitPrimitiveLiteral() { + return (ffi::VisitLiteralFn)&VisitPrimitiveLiteral; + } + template + static void VisitPrimitiveLiteral(void *state, uintptr_t sibling_list_id, CPP_TYPE value) { + auto state_cast = static_cast(state); + auto duckdb_value = CREATE_VALUE_FUN(value); + auto expression = make_uniq(duckdb_value); + state_cast->AppendToList(sibling_list_id, std::move(expression)); + } + + static void VisitPrimitiveLiteralBool(void *state, uintptr_t sibling_list_id, bool value); + static void VisitPrimitiveLiteralByte(void *state, uintptr_t sibling_list_id, int8_t value); + static void VisitPrimitiveLiteralShort(void *state, uintptr_t sibling_list_id, int16_t value); + static void VisitPrimitiveLiteralInt(void *state, uintptr_t sibling_list_id, int32_t value); + static void VisitPrimitiveLiteralLong(void *state, uintptr_t sibling_list_id, int64_t value); + static void VisitPrimitiveLiteralFloat(void *state, uintptr_t sibling_list_id, float value); + static void VisitPrimitiveLiteralDouble(void *state, uintptr_t sibling_list_id, double value); + + static void VisitTimestampLiteral(void *state, uintptr_t sibling_list_id, int64_t value); + static void VisitTimestampNtzLiteral(void *state, uintptr_t sibling_list_id, int64_t value); + static void VisitDateLiteral(void *state, uintptr_t sibling_list_id, int32_t value); + static void VisitStringLiteral(void *state, uintptr_t sibling_list_id, ffi::KernelStringSlice value); + static void VisitBinaryLiteral(void *state, uintptr_t sibling_list_id, const uint8_t *buffer, uintptr_t len); + static void VisitNullLiteral(void *state, uintptr_t sibling_list_id); + static void VisitArrayLiteral(void *state, uintptr_t sibling_list_id, uintptr_t child_id); + static void VisitStructLiteral(void *data, uintptr_t sibling_list_id, uintptr_t child_field_list_value, + uintptr_t child_value_list_id); + static void VisitDecimalLiteral(void *state, uintptr_t sibling_list_id, uint64_t value_ms, uint64_t value_ls, + uint8_t precision, uint8_t scale); + static void VisitColumnExpression(void *state, uintptr_t sibling_list_id, ffi::KernelStringSlice name); + static void VisitStructExpression(void *state, uintptr_t sibling_list_id, uintptr_t child_list_id); + static void VisitNotExpression(void *state, uintptr_t sibling_list_id, uintptr_t child_list_id); + static void VisitIsNullExpression(void *state, uintptr_t sibling_list_id, uintptr_t child_list_id); + + template + static ffi::VisitVariadicFn VisitUnaryExpression() { + return &VisitVariadicExpression; + } + template + static ffi::VisitVariadicFn VisitBinaryExpression() { + return &VisitBinaryExpression; + } + template + static ffi::VisitVariadicFn VisitVariadicExpression() { + return &VisitVariadicExpression; + } + + template + static void VisitVariadicExpression(void *state, uintptr_t sibling_list_id, uintptr_t child_list_id) { + auto state_cast = static_cast(state); + auto children = state_cast->TakeFieldList(child_list_id); + if (!children) { + state_cast->AppendToList(sibling_list_id, std::move(make_uniq(Value(42)))); + return; + } + unique_ptr expression = make_uniq(EXPRESSION_TYPE, std::move(*children)); + state_cast->AppendToList(sibling_list_id, std::move(expression)); + } + + static void VisitAdditionExpression(void *state, uintptr_t sibling_list_id, uintptr_t child_list_id); + static void VisitSubctractionExpression(void *state, uintptr_t sibling_list_id, uintptr_t child_list_id); + static void VisitDivideExpression(void *state, uintptr_t sibling_list_id, uintptr_t child_list_id); + static void VisitMultiplyExpression(void *state, uintptr_t sibling_list_id, uintptr_t child_list_id); + + template + static void VisitBinaryExpression(void *state, uintptr_t sibling_list_id, uintptr_t child_list_id) { + auto state_cast = static_cast(state); + auto children = state_cast->TakeFieldList(child_list_id); + if (!children) { + state_cast->AppendToList(sibling_list_id, std::move(make_uniq(Value(42)))); + return; + } + + if (children->size() != 2) { + state_cast->AppendToList(sibling_list_id, std::move(make_uniq(Value(42)))); + state_cast->error = + ErrorData("INCORRECT SIZE IN VISIT_BINARY_EXPRESSION" + EnumUtil::ToString(EXPRESSION_TYPE)); + return; + } + + auto &lhs = children->at(0); + auto &rhs = children->at(1); + unique_ptr expression = + make_uniq(EXPRESSION_TYPE, std::move(lhs), std::move(rhs)); + state_cast->AppendToList(sibling_list_id, std::move(expression)); + } + + static void VisitComparisonExpression(void *state, uintptr_t sibling_list_id, uintptr_t child_list_id); + + // List functions + static uintptr_t MakeFieldList(ExpressionVisitor *state, uintptr_t capacity_hint); + void AppendToList(uintptr_t id, unique_ptr child); + uintptr_t MakeFieldListImpl(uintptr_t capacity_hint); + unique_ptr TakeFieldList(uintptr_t id); +}; // SchemaVisitor is used to parse the schema of a Delta table from the Kernel class SchemaVisitor { @@ -115,6 +232,68 @@ typedef TemplatedUniqueKernelPointer KernelScan typedef TemplatedUniqueKernelPointer KernelGlobalScanState; typedef TemplatedUniqueKernelPointer KernelScanDataIterator; +template +struct SharedKernelPointer; + +// A reference to a SharedKernelPointer, only 1 can be handed out at the same time +template +struct SharedKernelRef { + friend struct SharedKernelPointer; + +public: + KernelType *GetPtr() { + return owning_pointer.kernel_ptr.get(); + } + ~SharedKernelRef() { + owning_pointer.lock.unlock(); + } + +protected: + SharedKernelRef(SharedKernelPointer &owning_pointer_p) + : owning_pointer(owning_pointer_p) { + owning_pointer.lock.lock(); + } + +protected: + // The pointer that owns this ref + SharedKernelPointer &owning_pointer; +}; + +// Wrapper around ffi objects to share between threads +template +struct SharedKernelPointer { + friend struct SharedKernelRef; + +public: + SharedKernelPointer(TemplatedUniqueKernelPointer unique_kernel_ptr) + : kernel_ptr(unique_kernel_ptr) { + } + SharedKernelPointer(KernelType *ptr) : kernel_ptr(ptr) { + } + SharedKernelPointer() { + } + + SharedKernelPointer(SharedKernelPointer &&other) : SharedKernelPointer() { + other.lock.lock(); + lock.lock(); + kernel_ptr = std::move(other.kernel_ptr); + lock.lock(); + other.lock.lock(); + } + + // Returns a reference to the underlying kernel object. The SharedKernelPointer to this object will be locked for + // the lifetime of this reference + SharedKernelRef GetLockingRef() { + return SharedKernelRef(*this); + } + +protected: + TemplatedUniqueKernelPointer kernel_ptr; + mutex lock; +}; + +typedef SharedKernelPointer SharedKernelSnapshot; + struct KernelUtils { static ffi::KernelStringSlice ToDeltaString(const string &str); static string FromDeltaString(const struct ffi::KernelStringSlice slice); @@ -127,11 +306,11 @@ struct KernelUtils { if (result.err._0) { auto error_cast = static_cast(result.err._0); error_cast->Throw(from_where); - } else { - throw IOException("Hit DeltaKernel FFI error (from: %s): Hit error, but error was nullptr", - from_where.c_str()); } - } else if (result.tag == ffi::ExternResult::Tag::Ok) { + throw IOException("Hit DeltaKernel FFI error (from: %s): Hit error, but error was nullptr", + from_where.c_str()); + } + if (result.tag == ffi::ExternResult::Tag::Ok) { return result.ok._0; } throw IOException("Invalid error ExternResult tag found!"); @@ -158,4 +337,25 @@ class PredicateVisitor : public ffi::EnginePredicate { uintptr_t VisitFilter(const string &col_name, const TableFilter &filter, ffi::KernelExpressionVisitorState *state); }; +// Singleton class to forward logs to DuckDB +class LoggerCallback { +public: + //! The Callback for the DuckDB setting to hook up Delta Kernel Logging to the DuckDB logger + static void DuckDBSettingCallBack(ClientContext &context, SetScope scope, Value ¶meter); + + //! Singleton GetInstance + static LoggerCallback &GetInstance(); + static void Initialize(DatabaseInstance &db); + static void CallbackEvent(ffi::Event log_line); + + static LogLevel GetDuckDBLogLevel(ffi::Level); + +protected: + LoggerCallback() { + } + + mutex lock; + weak_ptr db; +}; + } // namespace duckdb diff --git a/src/include/functions/delta_scan.hpp b/src/include/functions/delta_scan.hpp index 936de5a..86edd2e 100644 --- a/src/include/functions/delta_scan.hpp +++ b/src/include/functions/delta_scan.hpp @@ -12,6 +12,13 @@ #include "duckdb/common/multi_file_reader.hpp" namespace duckdb { +struct DeltaSnapshot; + +struct DeltaFunctionInfo : public TableFunctionInfo { + shared_ptr snapshot; + string expected_path; + string table_name; +}; struct DeltaFileMetaData { DeltaFileMetaData() {}; @@ -36,7 +43,7 @@ struct DeltaFileMetaData { //! The DeltaSnapshot implements the MultiFileList API to allow injecting it into the regular DuckDB parquet scan struct DeltaSnapshot : public MultiFileList { DeltaSnapshot(ClientContext &context, const string &path); - string GetPath(); + string GetPath() const; static string ToDuckDBPath(const string &raw_path); static string ToDeltaPath(const string &raw_path); @@ -51,14 +58,17 @@ struct DeltaSnapshot : public MultiFileList { idx_t GetTotalFileCount() override; unique_ptr GetCardinality(ClientContext &context) override; + idx_t GetVersion(); + DeltaFileMetaData &GetMetaData(idx_t index) const; protected: //! Get the i-th expanded file string GetFile(idx_t i) override; protected: - // TODO: How to guarantee we only call this after the filter pushdown? - void InitializeFiles(); + string GetFileInternal(idx_t i); + void InitializeSnapshot(); + void InitializeScan(); template T TryUnpackKernelResult(ffi::ExternResult result) { @@ -66,12 +76,20 @@ struct DeltaSnapshot : public MultiFileList { result, StringUtil::Format("While trying to read from delta table: '%s'", paths[0])); } - // TODO: change back to protected -public: + static void VisitData(void *engine_context, ffi::ExclusiveEngineData *engine_data, + const struct ffi::KernelBoolSlice selection_vec); + static void VisitCallback(ffi::NullableCvoid engine_context, struct ffi::KernelStringSlice path, int64_t size, + const ffi::Stats *stats, const ffi::DvInfo *dv_info, + const struct ffi::CStringMap *partition_values); + +protected: + mutable mutex lock; + idx_t version; //! Delta Kernel Structures - KernelSnapshot snapshot; + shared_ptr snapshot; + KernelExternEngine extern_engine; KernelScan scan; KernelGlobalScanState global_state; @@ -79,12 +97,16 @@ struct DeltaSnapshot : public MultiFileList { //! Names vector names; + vector types; + bool have_bound = false; //! Metadata map for files vector> metadata; //! Current file list resolution state - bool initialized = false; + bool initialized_snapshot = false; + bool initialized_scan = false; + bool files_exhausted = false; vector resolved_files; TableFilterSet table_filters; @@ -105,9 +127,9 @@ struct DeltaMultiFileReaderGlobalState : public MultiFileReaderGlobalState { }; struct DeltaMultiFileReader : public MultiFileReader { - static unique_ptr CreateInstance(); + static unique_ptr CreateInstance(const TableFunction &table_function); //! Return a DeltaSnapshot - unique_ptr CreateFileList(ClientContext &context, const vector &paths, + shared_ptr CreateFileList(ClientContext &context, const vector &paths, FileGlobOptions options) override; //! Override the regular parquet bind using the MultiFileReader Bind. The bind from these are what DuckDB's file @@ -121,7 +143,7 @@ struct DeltaMultiFileReader : public MultiFileReader { void CreateNameMapping(const string &file_name, const vector &local_types, const vector &local_names, const vector &global_types, - const vector &global_names, const vector &global_column_ids, + const vector &global_names, const vector &global_column_ids, MultiFileReaderData &reader_data, const string &initial_file, optional_ptr global_state) override; @@ -129,12 +151,12 @@ struct DeltaMultiFileReader : public MultiFileReader { InitializeGlobalState(ClientContext &context, const MultiFileReaderOptions &file_options, const MultiFileReaderBindData &bind_data, const MultiFileList &file_list, const vector &global_types, const vector &global_names, - const vector &global_column_ids) override; + const vector &global_column_ids) override; void FinalizeBind(const MultiFileReaderOptions &file_options, const MultiFileReaderBindData &options, const string &filename, const vector &local_names, const vector &global_types, const vector &global_names, - const vector &global_column_ids, MultiFileReaderData &reader_data, + const vector &global_column_ids, MultiFileReaderData &reader_data, ClientContext &context, optional_ptr global_state) override; //! Override the FinalizeChunk method @@ -145,6 +167,10 @@ struct DeltaMultiFileReader : public MultiFileReader { //! Override the ParseOption call to parse delta_scan specific options bool ParseOption(const string &key, const Value &val, MultiFileReaderOptions &options, ClientContext &context) override; + + // A snapshot can be injected into the multifilereader, this ensures the GetMultiFileList can return this snapshot + // (note that the path should match the one passed to CreateFileList) + shared_ptr snapshot; }; } // namespace duckdb diff --git a/src/include/functions/expression_functions.hpp b/src/include/functions/expression_functions.hpp new file mode 100644 index 0000000..e69de29 diff --git a/src/include/storage/delta_catalog.hpp b/src/include/storage/delta_catalog.hpp new file mode 100644 index 0000000..17549dd --- /dev/null +++ b/src/include/storage/delta_catalog.hpp @@ -0,0 +1,81 @@ +//===----------------------------------------------------------------------===// +// DuckDB +// +// storage/delta_catalog.hpp +// +// +//===----------------------------------------------------------------------===// + +#pragma once + +#include "delta_schema_entry.hpp" +#include "duckdb/catalog/catalog.hpp" +#include "duckdb/function/table_function.hpp" +#include "duckdb/common/enums/access_mode.hpp" + +namespace duckdb { +class DeltaSchemaEntry; + +class DeltaClearCacheFunction : public TableFunction { +public: + DeltaClearCacheFunction(); + + static void ClearCacheOnSetting(ClientContext &context, SetScope scope, Value ¶meter); +}; + +class DeltaCatalog : public Catalog { +public: + explicit DeltaCatalog(AttachedDatabase &db_p, const string &internal_name, AccessMode access_mode); + ~DeltaCatalog(); + + string path; + AccessMode access_mode; + bool use_cache; + +public: + void Initialize(bool load_builtin) override; + string GetCatalogType() override { + return "delta"; + } + + optional_ptr CreateSchema(CatalogTransaction transaction, CreateSchemaInfo &info) override; + + void ScanSchemas(ClientContext &context, std::function callback) override; + + optional_ptr GetSchema(CatalogTransaction transaction, const string &schema_name, + OnEntryNotFound if_not_found, + QueryErrorContext error_context = QueryErrorContext()) override; + + unique_ptr PlanInsert(ClientContext &context, LogicalInsert &op, + unique_ptr plan) override; + unique_ptr PlanCreateTableAs(ClientContext &context, LogicalCreateTable &op, + unique_ptr plan) override; + unique_ptr PlanDelete(ClientContext &context, LogicalDelete &op, + unique_ptr plan) override; + unique_ptr PlanUpdate(ClientContext &context, LogicalUpdate &op, + unique_ptr plan) override; + unique_ptr BindCreateIndex(Binder &binder, CreateStatement &stmt, TableCatalogEntry &table, + unique_ptr plan) override; + + DatabaseSize GetDatabaseSize(ClientContext &context) override; + + optional_idx GetCatalogVersion(ClientContext &context) override; + + bool InMemory() override; + string GetDBPath() override; + + bool UseCachedSnapshot(); + + DeltaSchemaEntry &GetMainSchema() { + return *main_schema; + } + +private: + void DropSchema(ClientContext &context, DropInfo &info) override; + +private: + unique_ptr main_schema; + string default_schema; +}; + +} // namespace duckdb diff --git a/src/include/storage/delta_schema_entry.hpp b/src/include/storage/delta_schema_entry.hpp new file mode 100644 index 0000000..dc41a4c --- /dev/null +++ b/src/include/storage/delta_schema_entry.hpp @@ -0,0 +1,52 @@ +//===----------------------------------------------------------------------===// +// DuckDB +// +// storage/delta_schema_entry.hpp +// +// +//===----------------------------------------------------------------------===// + +#pragma once + +#include "duckdb/catalog/catalog_entry/schema_catalog_entry.hpp" +#include "storage/delta_table_entry.hpp" + +namespace duckdb { +class DeltaTransaction; + +class DeltaSchemaEntry : public SchemaCatalogEntry { +public: + DeltaSchemaEntry(Catalog &catalog, CreateSchemaInfo &info); + ~DeltaSchemaEntry() override; + +public: + optional_ptr CreateTable(CatalogTransaction transaction, BoundCreateTableInfo &info) override; + optional_ptr CreateFunction(CatalogTransaction transaction, CreateFunctionInfo &info) override; + optional_ptr CreateIndex(CatalogTransaction transaction, CreateIndexInfo &info, + TableCatalogEntry &table) override; + optional_ptr CreateView(CatalogTransaction transaction, CreateViewInfo &info) override; + optional_ptr CreateSequence(CatalogTransaction transaction, CreateSequenceInfo &info) override; + optional_ptr CreateTableFunction(CatalogTransaction transaction, + CreateTableFunctionInfo &info) override; + optional_ptr CreateCopyFunction(CatalogTransaction transaction, + CreateCopyFunctionInfo &info) override; + optional_ptr CreatePragmaFunction(CatalogTransaction transaction, + CreatePragmaFunctionInfo &info) override; + optional_ptr CreateCollation(CatalogTransaction transaction, CreateCollationInfo &info) override; + optional_ptr CreateType(CatalogTransaction transaction, CreateTypeInfo &info) override; + void Alter(CatalogTransaction transaction, AlterInfo &info) override; + void Scan(ClientContext &context, CatalogType type, const std::function &callback) override; + void Scan(CatalogType type, const std::function &callback) override; + void DropEntry(ClientContext &context, DropInfo &info) override; + optional_ptr GetEntry(CatalogTransaction transaction, CatalogType type, const string &name) override; + + optional_ptr GetCachedTable(); + +private: + //! Delta tables may be cached in the SchemaEntry. Since the TableEntry holds the snapshot, this allows sharing a + //! snapshot between different scans. + unique_ptr cached_table; + mutex lock; +}; + +} // namespace duckdb diff --git a/src/include/storage/delta_table_entry.hpp b/src/include/storage/delta_table_entry.hpp new file mode 100644 index 0000000..5263e88 --- /dev/null +++ b/src/include/storage/delta_table_entry.hpp @@ -0,0 +1,36 @@ +//===----------------------------------------------------------------------===// +// DuckDB +// +// storage/delta_table_entry.hpp +// +// +//===----------------------------------------------------------------------===// + +#pragma once + +#include "duckdb/catalog/catalog_entry/table_catalog_entry.hpp" +#include "duckdb/parser/parsed_data/create_table_info.hpp" + +namespace duckdb { +struct DeltaSnapshot; + +class DeltaTableEntry : public TableCatalogEntry { +public: + DeltaTableEntry(Catalog &catalog, SchemaCatalogEntry &schema, CreateTableInfo &info); + ~DeltaTableEntry(); + +public: + unique_ptr GetStatistics(ClientContext &context, column_t column_id) override; + + TableFunction GetScanFunction(ClientContext &context, unique_ptr &bind_data) override; + + TableStorageInfo GetStorageInfo(ClientContext &context) override; + + void BindUpdateConstraints(Binder &binder, LogicalGet &get, LogicalProjection &proj, LogicalUpdate &update, + ClientContext &context) override; + +public: + shared_ptr snapshot; +}; + +} // namespace duckdb diff --git a/src/include/storage/delta_transaction.hpp b/src/include/storage/delta_transaction.hpp new file mode 100644 index 0000000..b9d369c --- /dev/null +++ b/src/include/storage/delta_transaction.hpp @@ -0,0 +1,46 @@ +//===----------------------------------------------------------------------===// +// DuckDB +// +// storage/delta_transaction.hpp +// +// +//===----------------------------------------------------------------------===// + +#pragma once + +#include "duckdb/transaction/transaction.hpp" + +namespace duckdb { +class DeltaCatalog; +class DeltaSchemaEntry; +class DeltaTableEntry; +struct DeltaSnapshot; + +enum class DeltaTransactionState { TRANSACTION_NOT_YET_STARTED, TRANSACTION_STARTED, TRANSACTION_FINISHED }; + +class DeltaTransaction : public Transaction { +public: + DeltaTransaction(DeltaCatalog &delta_catalog, TransactionManager &manager, ClientContext &context); + ~DeltaTransaction() override; + + void Start(); + void Commit(); + void Rollback(); + + static DeltaTransaction &Get(ClientContext &context, Catalog &catalog); + AccessMode GetAccessMode() const; + + void SetReadWrite() override { + throw NotImplementedException("Can not start read-write transaction"); + }; + +public: + unique_ptr table_entry; + +private: + // DeltaConnection connection; + DeltaTransactionState transaction_state; + AccessMode access_mode; +}; + +} // namespace duckdb diff --git a/src/include/storage/delta_transaction_manager.hpp b/src/include/storage/delta_transaction_manager.hpp new file mode 100644 index 0000000..3957982 --- /dev/null +++ b/src/include/storage/delta_transaction_manager.hpp @@ -0,0 +1,33 @@ +//===----------------------------------------------------------------------===// +// DuckDB +// +// storage/delta_transaction_manager.hpp +// +// +//===----------------------------------------------------------------------===// + +#pragma once + +#include "duckdb/transaction/transaction_manager.hpp" +#include "storage/delta_catalog.hpp" +#include "storage/delta_transaction.hpp" + +namespace duckdb { + +class DeltaTransactionManager : public TransactionManager { +public: + DeltaTransactionManager(AttachedDatabase &db_p, DeltaCatalog &delta_catalog); + + Transaction &StartTransaction(ClientContext &context) override; + ErrorData CommitTransaction(ClientContext &context, Transaction &transaction) override; + void RollbackTransaction(Transaction &transaction) override; + + void Checkpoint(ClientContext &context, bool force = false) override; + +private: + DeltaCatalog &delta_catalog; + mutex transaction_lock; + reference_map_t> transactions; +}; + +} // namespace duckdb diff --git a/src/storage/delta_catalog.cpp b/src/storage/delta_catalog.cpp new file mode 100644 index 0000000..fb301e2 --- /dev/null +++ b/src/storage/delta_catalog.cpp @@ -0,0 +1,113 @@ +#include "storage/delta_catalog.hpp" +#include "storage/delta_schema_entry.hpp" +#include "storage/delta_transaction.hpp" +#include "duckdb/storage/database_size.hpp" +#include "duckdb/parser/parsed_data/drop_info.hpp" +#include "duckdb/parser/parsed_data/create_schema_info.hpp" +#include "duckdb/main/attached_database.hpp" + +#include "functions/delta_scan.hpp" +#include "storage/delta_transaction_manager.hpp" + +namespace duckdb { + +DeltaCatalog::DeltaCatalog(AttachedDatabase &db_p, const string &path, AccessMode access_mode) + : Catalog(db_p), path(path), access_mode(access_mode), use_cache(false) { +} + +DeltaCatalog::~DeltaCatalog() = default; + +void DeltaCatalog::Initialize(bool load_builtin) { + CreateSchemaInfo info; + main_schema = make_uniq(*this, info); +} + +optional_ptr DeltaCatalog::CreateSchema(CatalogTransaction transaction, CreateSchemaInfo &info) { + throw BinderException("Delta tables do not support creating new schemas"); +} + +void DeltaCatalog::DropSchema(ClientContext &context, DropInfo &info) { + throw BinderException("Delta tables do not support dropping schemas"); +} + +void DeltaCatalog::ScanSchemas(ClientContext &context, std::function callback) { + callback(*main_schema); +} + +optional_ptr DeltaCatalog::GetSchema(CatalogTransaction transaction, const string &schema_name, + OnEntryNotFound if_not_found, + QueryErrorContext error_context) { + if (schema_name == DEFAULT_SCHEMA || schema_name == INVALID_SCHEMA) { + return main_schema.get(); + } + if (if_not_found == OnEntryNotFound::RETURN_NULL) { + return nullptr; + } + return nullptr; +} + +bool DeltaCatalog::InMemory() { + return false; +} + +string DeltaCatalog::GetDBPath() { + return path; +} + +bool DeltaCatalog::UseCachedSnapshot() { + return use_cache; +} + +optional_idx DeltaCatalog::GetCatalogVersion(ClientContext &context) { + auto &delta_transaction = DeltaTransaction::Get(context, *this); + idx_t version = DConstants::INVALID_INDEX; + + // Option 1: snapshot is cached table-wide + auto cached_snapshot = main_schema->GetCachedTable(); + if (cached_snapshot) { + version = cached_snapshot->snapshot->GetVersion(); + } + + // Option 2: snapshot is cached in transaction + if (delta_transaction.table_entry) { + version = delta_transaction.table_entry->snapshot->GetVersion(); + } + + if (version != DConstants::INVALID_INDEX) { + return version; + } + + return optional_idx::Invalid(); +} + +DatabaseSize DeltaCatalog::GetDatabaseSize(ClientContext &context) { + if (default_schema.empty()) { + throw InvalidInputException("Attempting to fetch the database size - but no database was provided " + "in the connection string"); + } + DatabaseSize size; + return size; +} + +unique_ptr DeltaCatalog::PlanInsert(ClientContext &context, LogicalInsert &op, + unique_ptr plan) { + throw NotImplementedException("DeltaCatalog does not support inserts"); +} +unique_ptr DeltaCatalog::PlanCreateTableAs(ClientContext &context, LogicalCreateTable &op, + unique_ptr plan) { + throw NotImplementedException("DeltaCatalog does not support creating new tables"); +} +unique_ptr DeltaCatalog::PlanDelete(ClientContext &context, LogicalDelete &op, + unique_ptr plan) { + throw NotImplementedException("DeltaCatalog does not support deletes"); +} +unique_ptr DeltaCatalog::PlanUpdate(ClientContext &context, LogicalUpdate &op, + unique_ptr plan) { + throw NotImplementedException("DeltaCatalog does not support updates"); +} +unique_ptr DeltaCatalog::BindCreateIndex(Binder &binder, CreateStatement &stmt, + TableCatalogEntry &table, unique_ptr plan) { + throw NotImplementedException("DeltaCatalog does not support creating indices"); +} + +} // namespace duckdb diff --git a/src/storage/delta_schema_entry.cpp b/src/storage/delta_schema_entry.cpp new file mode 100644 index 0000000..61348d4 --- /dev/null +++ b/src/storage/delta_schema_entry.cpp @@ -0,0 +1,183 @@ +#include "storage/delta_schema_entry.hpp" + +#include "functions/delta_scan.hpp" +#include "storage/delta_catalog.hpp" + +#include "delta_extension.hpp" + +#include "storage/delta_table_entry.hpp" +#include "storage/delta_transaction.hpp" +#include "duckdb/parser/parsed_data/create_view_info.hpp" +#include "duckdb/parser/parsed_data/create_index_info.hpp" +#include "duckdb/planner/parsed_data/bound_create_table_info.hpp" +#include "duckdb/parser/parsed_data/drop_info.hpp" +#include "duckdb/parser/constraints/list.hpp" +#include "duckdb/common/unordered_set.hpp" +#include "duckdb/parser/parsed_data/alter_info.hpp" +#include "duckdb/parser/parsed_data/alter_table_info.hpp" +#include "duckdb/parser/parsed_expression_iterator.hpp" + +namespace duckdb { + +DeltaSchemaEntry::DeltaSchemaEntry(Catalog &catalog, CreateSchemaInfo &info) : SchemaCatalogEntry(catalog, info) { +} + +DeltaSchemaEntry::~DeltaSchemaEntry() { +} + +DeltaTransaction &GetDeltaTransaction(CatalogTransaction transaction) { + if (!transaction.transaction) { + throw InternalException("No transaction!?"); + } + return transaction.transaction->Cast(); +} + +optional_ptr DeltaSchemaEntry::CreateTable(CatalogTransaction transaction, BoundCreateTableInfo &info) { + throw BinderException("Delta tables do not support creating tables"); +} + +optional_ptr DeltaSchemaEntry::CreateFunction(CatalogTransaction transaction, CreateFunctionInfo &info) { + throw BinderException("Delta tables do not support creating functions"); +} + +void DeltaUnqualifyColumnRef(ParsedExpression &expr) { + if (expr.type == ExpressionType::COLUMN_REF) { + auto &colref = expr.Cast(); + auto name = std::move(colref.column_names.back()); + colref.column_names = {std::move(name)}; + return; + } + ParsedExpressionIterator::EnumerateChildren(expr, DeltaUnqualifyColumnRef); +} + +optional_ptr DeltaSchemaEntry::CreateIndex(CatalogTransaction transaction, CreateIndexInfo &info, + TableCatalogEntry &table) { + throw NotImplementedException("CreateIndex"); +} + +string GetDeltaCreateView(CreateViewInfo &info) { + throw NotImplementedException("GetCreateView"); +} + +optional_ptr DeltaSchemaEntry::CreateView(CatalogTransaction transaction, CreateViewInfo &info) { + throw BinderException("Delta tables do not support creating views"); +} + +optional_ptr DeltaSchemaEntry::CreateType(CatalogTransaction transaction, CreateTypeInfo &info) { + throw BinderException("Delta databases do not support creating types"); +} + +optional_ptr DeltaSchemaEntry::CreateSequence(CatalogTransaction transaction, CreateSequenceInfo &info) { + throw BinderException("Delta databases do not support creating sequences"); +} + +optional_ptr DeltaSchemaEntry::CreateTableFunction(CatalogTransaction transaction, + CreateTableFunctionInfo &info) { + throw BinderException("Delta databases do not support creating table functions"); +} + +optional_ptr DeltaSchemaEntry::CreateCopyFunction(CatalogTransaction transaction, + CreateCopyFunctionInfo &info) { + throw BinderException("Delta databases do not support creating copy functions"); +} + +optional_ptr DeltaSchemaEntry::CreatePragmaFunction(CatalogTransaction transaction, + CreatePragmaFunctionInfo &info) { + throw BinderException("Delta databases do not support creating pragma functions"); +} + +optional_ptr DeltaSchemaEntry::CreateCollation(CatalogTransaction transaction, + CreateCollationInfo &info) { + throw BinderException("Delta databases do not support creating collations"); +} + +void DeltaSchemaEntry::Alter(CatalogTransaction transaction, AlterInfo &info) { + throw NotImplementedException("Delta tables do not support altering"); +} + +bool CatalogTypeIsSupported(CatalogType type) { + switch (type) { + case CatalogType::TABLE_ENTRY: + return true; + default: + return false; + } +} + +static unique_ptr CreateTableEntry(ClientContext &context, DeltaCatalog &delta_catalog, + DeltaSchemaEntry &schema_entry) { + auto snapshot = make_shared_ptr(context, delta_catalog.GetDBPath()); + + // Get the names and types from the delta snapshot + vector return_types; + vector names; + snapshot->Bind(return_types, names); + + CreateTableInfo table_info; + for (idx_t i = 0; i < return_types.size(); i++) { + table_info.columns.AddColumn(ColumnDefinition(names[i], return_types[i])); + } + table_info.table = DEFAULT_DELTA_TABLE; + auto table_entry = make_uniq(delta_catalog, schema_entry, table_info); + table_entry->snapshot = std::move(snapshot); + + return table_entry; +} + +void DeltaSchemaEntry::Scan(ClientContext &context, CatalogType type, + const std::function &callback) { + if (!CatalogTypeIsSupported(type)) { + auto transaction = catalog.GetCatalogTransaction(context); + auto default_table = GetEntry(transaction, type, DEFAULT_DELTA_TABLE); + if (default_table) { + callback(*default_table); + } + } +} +void DeltaSchemaEntry::Scan(CatalogType type, const std::function &callback) { + throw NotImplementedException("Scan without context not supported"); +} + +void DeltaSchemaEntry::DropEntry(ClientContext &context, DropInfo &info) { + throw NotImplementedException("Delta tables do not support dropping"); +} + +optional_ptr DeltaSchemaEntry::GetEntry(CatalogTransaction transaction, CatalogType type, + const string &name) { + if (!transaction.HasContext()) { + throw NotImplementedException("Can not DeltaSchemaEntry::GetEntry without context"); + } + auto &context = transaction.GetContext(); + + if (type == CatalogType::TABLE_ENTRY && name == DEFAULT_DELTA_TABLE) { + auto &delta_transaction = GetDeltaTransaction(transaction); + auto &delta_catalog = catalog.Cast(); + + if (delta_transaction.table_entry) { + return *delta_transaction.table_entry; + } + + if (delta_catalog.UseCachedSnapshot()) { + unique_lock l(lock); + if (!cached_table) { + cached_table = CreateTableEntry(context, delta_catalog, *this); + } + return *cached_table; + } + + delta_transaction.table_entry = CreateTableEntry(context, delta_catalog, *this); + return *delta_transaction.table_entry; + } + + return nullptr; +} + +optional_ptr DeltaSchemaEntry::GetCachedTable() { + lock_guard lck(lock); + if (cached_table) { + return *cached_table; + } + return nullptr; +} + +} // namespace duckdb diff --git a/src/storage/delta_table_entry.cpp b/src/storage/delta_table_entry.cpp new file mode 100644 index 0000000..be6ea58 --- /dev/null +++ b/src/storage/delta_table_entry.cpp @@ -0,0 +1,74 @@ +#include "storage/delta_catalog.hpp" +#include "storage/delta_schema_entry.hpp" +#include "storage/delta_table_entry.hpp" + +#include "delta_utils.hpp" +#include "functions/delta_scan.hpp" + +#include "storage/delta_transaction.hpp" +#include "duckdb/storage/statistics/base_statistics.hpp" +#include "duckdb/storage/table_storage_info.hpp" +#include "duckdb/main/extension_util.hpp" +#include "duckdb/main/database.hpp" +#include "duckdb/main/secret/secret_manager.hpp" +#include "duckdb/catalog/catalog_entry/table_function_catalog_entry.hpp" +#include "duckdb/parser/tableref/table_function_ref.hpp" +#include "../../duckdb/third_party/catch/catch.hpp" +#include "functions/delta_scan.hpp" + +#include + +namespace duckdb { + +DeltaTableEntry::DeltaTableEntry(Catalog &catalog, SchemaCatalogEntry &schema, CreateTableInfo &info) + : TableCatalogEntry(catalog, schema, info) { + this->internal = false; +} + +DeltaTableEntry::~DeltaTableEntry() = default; + +unique_ptr DeltaTableEntry::GetStatistics(ClientContext &context, column_t column_id) { + return nullptr; +} + +void DeltaTableEntry::BindUpdateConstraints(Binder &binder, LogicalGet &, LogicalProjection &, LogicalUpdate &, + ClientContext &) { + throw NotImplementedException("BindUpdateConstraints for delta table"); +} + +TableFunction DeltaTableEntry::GetScanFunction(ClientContext &context, unique_ptr &bind_data) { + auto &db = DatabaseInstance::GetDatabase(context); + auto &delta_function_set = ExtensionUtil::GetTableFunction(db, "delta_scan"); + + auto delta_scan_function = delta_function_set.functions.GetFunctionByArguments(context, {LogicalType::VARCHAR}); + auto &delta_catalog = catalog.Cast(); + + // Copy over the internal kernel snapshot + auto function_info = make_shared_ptr(); + + function_info->snapshot = this->snapshot; + function_info->table_name = delta_catalog.GetName(); + delta_scan_function.function_info = std::move(function_info); + + vector inputs = {delta_catalog.GetDBPath()}; + named_parameter_map_t param_map; + vector return_types; + vector names; + TableFunctionRef empty_ref; + + TableFunctionBindInput bind_input(inputs, param_map, return_types, names, nullptr, nullptr, delta_scan_function, + empty_ref); + + auto result = delta_scan_function.bind(context, bind_input, return_types, names); + bind_data = std::move(result); + + return delta_scan_function; +} + +TableStorageInfo DeltaTableEntry::GetStorageInfo(ClientContext &context) { + TableStorageInfo result; + // TODO fill info + return result; +} + +} // namespace duckdb diff --git a/src/storage/delta_transaction.cpp b/src/storage/delta_transaction.cpp new file mode 100644 index 0000000..2af1a46 --- /dev/null +++ b/src/storage/delta_transaction.cpp @@ -0,0 +1,42 @@ +#include "storage/delta_transaction.hpp" +#include "storage/delta_catalog.hpp" +#include "duckdb/parser/parsed_data/create_view_info.hpp" +#include "duckdb/catalog/catalog_entry/index_catalog_entry.hpp" +#include "duckdb/catalog/catalog_entry/view_catalog_entry.hpp" +#include "functions/delta_scan.hpp" +#include "storage/delta_table_entry.hpp" + +namespace duckdb { + +DeltaTransaction::DeltaTransaction(DeltaCatalog &delta_catalog, TransactionManager &manager, ClientContext &context) + : Transaction(manager, context), access_mode(delta_catalog.access_mode) { +} + +DeltaTransaction::~DeltaTransaction() { +} + +void DeltaTransaction::Start() { + transaction_state = DeltaTransactionState::TRANSACTION_NOT_YET_STARTED; +} +void DeltaTransaction::Commit() { + if (transaction_state == DeltaTransactionState::TRANSACTION_STARTED) { + transaction_state = DeltaTransactionState::TRANSACTION_FINISHED; + // NOP: we only support read-only transactions currently + } +} +void DeltaTransaction::Rollback() { + if (transaction_state == DeltaTransactionState::TRANSACTION_STARTED) { + transaction_state = DeltaTransactionState::TRANSACTION_FINISHED; + // NOP: we only support read-only transactions currently + } +} + +DeltaTransaction &DeltaTransaction::Get(ClientContext &context, Catalog &catalog) { + return Transaction::Get(context, catalog).Cast(); +} + +AccessMode DeltaTransaction::GetAccessMode() const { + return access_mode; +} + +} // namespace duckdb diff --git a/src/storage/delta_transaction_manager.cpp b/src/storage/delta_transaction_manager.cpp new file mode 100644 index 0000000..4d64f77 --- /dev/null +++ b/src/storage/delta_transaction_manager.cpp @@ -0,0 +1,38 @@ +#include "storage/delta_transaction_manager.hpp" +#include "duckdb/main/attached_database.hpp" + +namespace duckdb { + +DeltaTransactionManager::DeltaTransactionManager(AttachedDatabase &db_p, DeltaCatalog &delta_catalog) + : TransactionManager(db_p), delta_catalog(delta_catalog) { +} + +Transaction &DeltaTransactionManager::StartTransaction(ClientContext &context) { + auto transaction = make_uniq(delta_catalog, *this, context); + transaction->Start(); + auto &result = *transaction; + lock_guard l(transaction_lock); + transactions[result] = std::move(transaction); + return result; +} + +ErrorData DeltaTransactionManager::CommitTransaction(ClientContext &context, Transaction &transaction) { + auto &delta_transaction = transaction.Cast(); + delta_transaction.Commit(); + lock_guard l(transaction_lock); + transactions.erase(transaction); + return ErrorData(); +} + +void DeltaTransactionManager::RollbackTransaction(Transaction &transaction) { + auto &delta_transaction = transaction.Cast(); + delta_transaction.Rollback(); + lock_guard l(transaction_lock); + transactions.erase(transaction); +} + +void DeltaTransactionManager::Checkpoint(ClientContext &context, bool force) { + // NOP +} + +} // namespace duckdb diff --git a/test/sql/cloud/gcs.test b/test/sql/cloud/gcs.test new file mode 100644 index 0000000..5a12aff --- /dev/null +++ b/test/sql/cloud/gcs.test @@ -0,0 +1,22 @@ +# name: test/sql/cloud/minio_local/gcs_r2.test +# description: test delta extension with GCS and R2 +# group: [aws] + +require httpfs + +require parquet + +require delta + +statement ok +CREATE SECRET ( + TYPE GCS, + KEY_ID 'SOME_KEY', + SECRET 'SOME SECRET' +); + +statement error +select col1, col2 from delta_scan('gcs://some-bucket/some-table'); +---- +403 + diff --git a/test/sql/dat/attach.test b/test/sql/dat/attach.test new file mode 100644 index 0000000..14ece4b --- /dev/null +++ b/test/sql/dat/attach.test @@ -0,0 +1,131 @@ +# name: test/sql/dat/attach.test +# description: Test attaching a delta table +# group: [dat] + +require parquet + +require delta + +require-env DAT_PATH + +statement ok +ATTACH '${DAT_PATH}/out/reader_tests/generated/all_primitive_types/delta' as dt (TYPE delta) + +# We can query the table by the catalog name +query I +select utf8 from dt +---- +0 +1 +2 +3 +4 + +# We can query the table using the catalog name + the constant `delta_table` as name +query I +select utf8 from dt.delta_table +---- +0 +1 +2 +3 +4 + +# We can query the table using the catalog name + default schema + the constant `delta_table` as name +query I +select utf8 from dt.main.delta_table +---- +0 +1 +2 +3 +4 + +# Now we create a different table that is actually called dt +statement ok +create table dt as select 1 as id, 2 as utf8 + +# This is now ambiguous! +statement error +from dt +---- +Catalog Error: Ambiguity detected for 'dt': this could either refer to the 'Table' 'dt', or the attached catalog 'dt' which has a default table. To avoid this error, either detach the catalog and reattach under a different name, or use a fully qualified name for the 'Table': 'memory.main.dt' or for the Catalog Default Table: 'dt.main.delta_table'. + +# Join the two tables using fully qualified names +query III +SELECT + id, + dt1.utf8, + dt2.utf8 +FROM + memory.main.dt as dt1 +LEFT JOIN + dt.main.delta_table as dt2 +ON + dt1.utf8 = dt2.utf8 +---- +1 2 2 + + +# You shouldn't be doing this, but its technically possible: we mount the single-table-catalog +statement ok +use dt + +# We can still query the delta catalog default table by its name +query I +select utf8 from dt +---- +0 +1 +2 +3 +4 + +# Or by the default delta table name (`delta_table`) +query I +select utf8 from delta_table +---- +0 +1 +2 +3 +4 + +# Or by specifying the default schema +query I +select utf8 from main.delta_table +---- +0 +1 +2 +3 +4 + +statement ok +USE memory + +statement ok +DROP TABLE main.dt + +statement ok +DETACH dt + +# Test the PIN_SNAPSHOT option: the snapshot is now pinned on attaching +statement ok +ATTACH '${DAT_PATH}/out/reader_tests/generated/all_primitive_types/delta' as dt (TYPE delta, PIN_SNAPSHOT) + +# This query will now reuse +query I +select utf8 from dt +---- +0 +1 +2 +3 +4 + +# Test that the explain output contains the table name +query II +explain from dt +---- +physical_plan :.*Table: dt.* \ No newline at end of file diff --git a/test/sql/delta_kernel_rs/logging.test b/test/sql/delta_kernel_rs/logging.test new file mode 100644 index 0000000..68fd5b1 --- /dev/null +++ b/test/sql/delta_kernel_rs/logging.test @@ -0,0 +1,44 @@ +# name: test/sql/delta_kernel_rs/logging.test +# description: test that delta kernel log entries are properly propagated to the DuckDB logger +# group: [delta_kernel_rs] + +require parquet + +require delta + +require-env DELTA_KERNEL_TESTS_PATH + +statement ok +set enable_logging=true; + +statement ok +SELECT * FROM delta_scan('${DELTA_KERNEL_TESTS_PATH}/basic_partitioned') + +# No kernel logging available yet: we need to set delta_kernel_logging=true +query I +SELECT count(*) FROM duckdb_logs WHERE starts_with(type, 'delta.Kernel') +---- +0 + +statement ok +set delta_kernel_logging=true; + +statement ok +set logging_level = 'TRACE'; + +statement ok +SELECT * FROM delta_scan('${DELTA_KERNEL_TESTS_PATH}/basic_partitioned') + +# Now we have log! +query I +SELECT count(*) > 50 FROM duckdb_logs WHERE starts_with(type, 'delta.Kernel') +---- +true + +statement ok +set delta_kernel_logging=true; + +statement error +set delta_kernel_logging=false; +---- +Invalid Input Error: Can not disable 'delta_kernel_logging' after enabling it \ No newline at end of file diff --git a/test/sql/generated/attach_parallel.test b/test/sql/generated/attach_parallel.test new file mode 100644 index 0000000..37a5fbb --- /dev/null +++ b/test/sql/generated/attach_parallel.test @@ -0,0 +1,100 @@ +# name: test/sql/generated/attach_parallel.test +# description: Test attaching a delta table and reading from it in parallel +# group: [dat] + +require parquet + +require delta + +require-env GENERATED_DATA_AVAILABLE + +statement ok +pragma threads=10; + +statement ok +ATTACH 'data/generated/simple_partitioned/delta_lake/' as dt (TYPE delta) + +statement ok +ATTACH 'data/generated/simple_partitioned/delta_lake/' as dt_pinned (TYPE delta, PIN_SNAPSHOT) + +concurrentloop threadid 0 20 + +query I +WITH RECURSIVE ctename AS ( + SELECT *, 1 as recursiondepth + FROM dt + UNION ALL + SELECT * EXCLUDE (c2.recursiondepth), c2.recursiondepth + 1 as recursiondepth + FROM ctename as c2 + WHERE c2.recursiondepth < 8 +) +SELECT count(i) FROM ctename; +---- +80 + +query I +WITH RECURSIVE ctename AS ( + SELECT *, 1 as recursiondepth + FROM dt_pinned + UNION ALL + SELECT * EXCLUDE (c2.recursiondepth), c2.recursiondepth + 1 as recursiondepth + FROM ctename as c2 + WHERE c2.recursiondepth < 8 +) +SELECT count(i) FROM ctename; +---- +80 + +endloop + +concurrentloop threadid 0 20 + +query I +SELECT count(i) FROM dt UNION ALL +SELECT count(i) FROM dt UNION ALL +SELECT count(i) FROM dt UNION ALL +SELECT count(i) FROM dt UNION ALL +SELECT count(i) FROM dt UNION ALL +SELECT count(i) FROM dt UNION ALL +SELECT count(i) FROM dt UNION ALL +SELECT count(i) FROM dt UNION ALL +SELECT count(i) FROM dt UNION ALL +SELECT count(i) FROM dt +---- +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 + +query I +SELECT count(i) FROM dt_pinned UNION ALL +SELECT count(i) FROM dt_pinned UNION ALL +SELECT count(i) FROM dt_pinned UNION ALL +SELECT count(i) FROM dt_pinned UNION ALL +SELECT count(i) FROM dt_pinned UNION ALL +SELECT count(i) FROM dt_pinned UNION ALL +SELECT count(i) FROM dt_pinned UNION ALL +SELECT count(i) FROM dt_pinned UNION ALL +SELECT count(i) FROM dt_pinned UNION ALL +SELECT count(i) FROM dt_pinned +---- +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 + + + +endloop \ No newline at end of file diff --git a/test/sql/generated/file_skipping_all_types.test b/test/sql/generated/file_skipping_all_types.test index e4348e8..e2b90ea 100644 --- a/test/sql/generated/file_skipping_all_types.test +++ b/test/sql/generated/file_skipping_all_types.test @@ -8,37 +8,127 @@ require delta require-env GENERATED_DATA_AVAILABLE -# TODO: this doesn't appear to skip files yet -# TODO: add tests once https://github.com/duckdb/duckdb/pull/12488 is available +foreach type float double -query I -select value -from delta_scan('./data/generated/test_file_skipping/bool/delta_lake') -where part != false -order by value +# using column to skip files +query II +EXPLAIN ANALYZE SELECT value1, value2, value3 +FROM delta_scan('./data/generated/test_file_skipping/${type}/delta_lake') +WHERE + value1 > 0.5 and + value2 > 2.5 and + value3 < 3.5 ---- -true +analyzed_plan :.*File Filters:.*value1>0.5.*value2>2.5.*value3<3.5.*Scanning Files: 1/5.* -foreach type bool int tinyint smallint bigint varchar +query III +SELECT value1, value2, value3 +FROM delta_scan('./data/generated/test_file_skipping/${type}/delta_lake') +WHERE + value1 > 0.5 and + value2 > 2.5 and + value3 < 3.5 +---- +3.0 3.0 3.0 -query I -select value -from delta_scan('./data/generated/test_file_skipping/${type}/delta_lake') -where part != 0 -order by value +# FIXME: Partition columns currently don't cause file skipping yet +query II +EXPLAIN ANALYZE SELECT part +FROM delta_scan('./data/generated/test_file_skipping/${type}/delta_lake') +WHERE part > 0.5 ---- -1 +analyzed_plan :.*File Filters:.* endloop -foreach type float double +# use bool column to skip files +query II +EXPLAIN ANALYZE SELECT * +FROM delta_scan('./data/generated/test_file_skipping/bool/delta_lake') +WHERE value1=false +---- +analyzed_plan :.*File Filters:.*value1=false.*Scanning Files: 1/2.* + +# FIXME: Partition columns currently don't cause file skipping yet +query II +EXPLAIN ANALYZE SELECT part +FROM delta_scan('./data/generated/test_file_skipping/bool/delta_lake') +WHERE part=false +---- +analyzed_plan :.*File Filters:.* + +foreach type int tinyint smallint bigint + +# using column to skip files +query II +EXPLAIN ANALYZE SELECT value1, value2, value3 +FROM delta_scan('./data/generated/test_file_skipping/${type}/delta_lake') +WHERE + value1 > 1 and + value2 > 2 and + value3 < 4 +---- +analyzed_plan :.*File Filters:.*value1>1.*value2>2.*value3<4.*Scanning Files: 1/5.* + +query III +SELECT value1, value2, value3 +FROM delta_scan('./data/generated/test_file_skipping/${type}/delta_lake') +WHERE + value1 > 1 and + value2 > 2 and + value3 < 4 +---- +3 3 3 -query I -select value -from delta_scan('./data/generated/test_file_skipping/${type}/delta_lake') -where part > 0.5 -order by value +# FIXME: Partition columns currently don't cause file skipping yet +query II +EXPLAIN ANALYZE SELECT part +FROM delta_scan('./data/generated/test_file_skipping/${type}/delta_lake') +WHERE part = 0 ---- -1.0 +analyzed_plan :.*File Filters:.* endloop + +# using column to skip files +query II +EXPLAIN ANALYZE SELECT value1, value2, value3 +FROM delta_scan('./data/generated/test_file_skipping/varchar/delta_lake') +WHERE + value1 = '2' and + value2 = '2' and + value3 = '2' +---- +analyzed_plan :.*File Filters:.*value1='2'.*value2='2'.*value3='2'.*Scanning Files: 1/5.* + +query III +SELECT value1, value2, value3 +FROM delta_scan('./data/generated/test_file_skipping/varchar/delta_lake') +WHERE + value1 = '2' and + value2 = '2' and + value3 = '2' +---- +2 2 2 + +# FIXME: Partition columns currently don't cause file skipping yet +query II +EXPLAIN ANALYZE SELECT part +FROM delta_scan('./data/generated/test_file_skipping/varchar/delta_lake') +WHERE part = '0' +---- +analyzed_plan :.*File Filters:.* + +# We can remove this from output if precise operator timing is crucial +statement ok +set delta_scan_explain_files_filtered = false; + +query II +EXPLAIN ANALYZE SELECT value1, value2, value3 +FROM delta_scan('./data/generated/test_file_skipping/varchar/delta_lake') +WHERE + value1 = '2' and + value2 = '2' and + value3 = '2' +---- +analyzed_plan :.*File Filters:.* \ No newline at end of file diff --git a/test/sql/main/test_expression.test b/test/sql/main/test_expression.test new file mode 100644 index 0000000..8eca5d4 --- /dev/null +++ b/test/sql/main/test_expression.test @@ -0,0 +1,50 @@ +# name: test/sql/main/test_expression.test +# description: Test the get_delta_test_expression function +# group: [delta_generated] + +require parquet + +require delta + +# TODO still broken: +# - Decimal +# - StructExpression +query I +SELECT unnest(get_delta_test_expression()) +---- +127 +-128 +3.4028235e+38 +-3.4028235e+38 +1.7976931348623157e+308 +-1.7976931348623157e+308 +2147483647 +-2147483648 +9223372036854775807 +-9223372036854775808 +'hello expressions' +true +false +'1970-01-01 00:00:00.00005+00'::TIMESTAMP WITH TIME ZONE +'1970-01-01 00:00:00.0001'::TIMESTAMP +'1970-02-02'::DATE +'\x00\x00\xDE\xAD\xBE\xEF\xCA\xFE'::BLOB +0.0000000042 +NULL +struct_pack("'top'" := struct_pack("'a'" := 500, "'b'" := list_value(5, 0))) +list_value(5, 0) +42 +not((col is NULL)) +(0 IN (0)) +(0 + 0) +(0 - 0) +(0 = 0) +(0 != 0) +(0 NOT IN (0)) +(0 / 0) +(0 * 0) +(0 < 0) +(0 <= 0) +(0 > 0) +(0 >= 0) +(0 IS DISTINCT FROM 0) \ No newline at end of file