├── .cargo └── config ├── .github └── workflows │ ├── Linux.yml │ ├── Windows.yml │ └── macOS.yml ├── .gitignore ├── .gitmodules ├── CMakeLists.txt ├── Cargo.lock ├── Cargo.toml ├── Dockerfile ├── LICENSE ├── Makefile ├── README.md ├── duckdb_athena_rust ├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── README.md ├── build.rs ├── cbindgen.toml ├── duckdb └── src │ ├── connection.rs │ ├── data_chunk.rs │ ├── database.rs │ ├── duckdb_athena_rust.cc │ ├── duckdb_athena_rust.h │ ├── error.rs │ ├── function_info.rs │ ├── lib.rs │ ├── logical_type.rs │ ├── table_function.rs │ ├── value.rs │ └── vector.rs ├── extension_config.cmake ├── scripts └── extension-upload.sh └── src ├── athena_extension.cpp ├── error.rs ├── include ├── athena_extension.hpp └── rust.h ├── lib.rs ├── table_function.rs └── types.rs /.cargo/config: -------------------------------------------------------------------------------- 1 | [doc.extern-map.registries] 2 | crates-io = "https://docs.rs/" 3 | -------------------------------------------------------------------------------- /.github/workflows/Linux.yml: -------------------------------------------------------------------------------- 1 | name: Linux 2 | on: [push, pull_request] 3 | concurrency: 4 | group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ github.ref != 'refs/heads/main' || github.sha }} 5 | cancel-in-progress: true 6 | defaults: 7 | run: 8 | shell: bash 9 | 10 | # TODO: Add rust, checkout duckdb_athena_rust/duckdb 11 | 12 | jobs: 13 | linux: 14 | name: Linux Release 15 | runs-on: ubuntu-latest 16 | # These permissions are needed to interact with GitHub's OIDC Token endpoint. 17 | permissions: 18 | id-token: write 19 | container: ${{ matrix.container }} 20 | strategy: 21 | matrix: 22 | # Add commits/tags to build against other DuckDB versions 23 | duckdb_version: [ '' ] 24 | arch: ['linux_amd64', 'linux_arm64'] # , 'linux_amd64_gcc4' 25 | include: 26 | - arch: 'linux_amd64' 27 | container: 'ubuntu:18.04' 28 | - arch: 'linux_arm64' 29 | container: 'ubuntu:18.04' 30 | # - arch: 'linux_amd64_gcc4' 31 | # container: 'quay.io/pypa/manylinux2014_x86_64' 32 | env: 33 | GEN: ninja 34 | 35 | steps: 36 | - name: Install required ubuntu packages 37 | if: ${{ matrix.arch == 'linux_amd64' || matrix.arch == 'linux_arm64' }} 38 | run: | 39 | apt-get update -y -qq 40 | apt-get install -y -qq software-properties-common 41 | add-apt-repository ppa:git-core/ppa 42 | apt-get update -y -qq 43 | apt-get install -y -qq \ 44 | build-essential \ 45 | checkinstall \ 46 | clang-5.0 \ 47 | curl \ 48 | g++-multilib \ 49 | gcc-multilib \ 50 | gettext \ 51 | lib32readline6-dev \ 52 | libc6-dev-i386 \ 53 | libclang-5.0-dev \ 54 | libcurl4-gnutls-dev \ 55 | libexpat1-dev \ 56 | libffi-dev \ 57 | libssl-dev \ 58 | libssl-dev \ 59 | libz-dev \ 60 | make \ 61 | maven \ 62 | ninja-build \ 63 | openjdk-8-jdk \ 64 | openssh-client \ 65 | unixodbc-dev \ 66 | unzip \ 67 | wget \ 68 | zip 69 | 70 | - name: Install required ubuntu packages 71 | if: ${{ matrix.arch == 'linux_amd64_gcc4' }} 72 | run: | 73 | yum install -y centos-release-scl llvm-toolset-7 74 | echo /opt/rh/llvm-toolset-7/root/usr/bin >> $GITHUB_PATH 75 | 76 | - name: Install latest nightly rust toolchain 77 | uses: actions-rs/toolchain@v1 78 | with: 79 | toolchain: nightly 80 | override: true 81 | components: rustfmt, clippy 82 | 83 | - name: Install Git 2.18.5 84 | if: ${{ matrix.arch == 'linux_amd64' || matrix.arch == 'linux_arm64' }} 85 | run: | 86 | wget https://github.com/git/git/archive/refs/tags/v2.18.5.tar.gz 87 | tar xvf v2.18.5.tar.gz 88 | cd git-2.18.5 89 | make 90 | make prefix=/usr install 91 | git --version 92 | 93 | - uses: actions/checkout@v3 94 | with: 95 | fetch-depth: 0 96 | submodules: 'true' 97 | 98 | - name: Checkout DuckDB to version 99 | if: ${{ matrix.duckdb_version != ''}} 100 | run: | 101 | cd duckdb 102 | git checkout ${{ matrix.duckdb_version }} 103 | cd ../duckdb_athena_rust/duckdb 104 | git checkout ${{ matrix.duckdb_version }} 105 | 106 | - if: ${{ matrix.arch == 'linux_amd64_gcc4' }} 107 | uses: ./duckdb/.github/actions/centos_7_setup 108 | with: 109 | openssl: 0 110 | 111 | - if: ${{ matrix.arch == 'linux_amd64' || matrix.arch == 'linux_arm64' }} 112 | uses: ./duckdb/.github/actions/ubuntu_18_setup 113 | with: 114 | aarch64_cross_compile: ${{ matrix.arch == 'linux_arm64' && 1 }} 115 | 116 | # Build extension 117 | - name: Build extension 118 | env: 119 | GEN: ninja 120 | STATIC_LIBCPP: 1 121 | # TARGET_CC instead of CC: https://github.com/briansmith/ring/issues/578#issuecomment-510988473 122 | TARGET_CC: ${{ matrix.arch == 'linux_arm64' && 'aarch64-linux-gnu-gcc' || '' }} 123 | TARGET_CXX: ${{ matrix.arch == 'linux_arm64' && 'aarch64-linux-gnu-g++' || '' }} 124 | run: | 125 | make release 126 | 127 | - uses: actions/upload-artifact@v4 128 | with: 129 | name: ${{matrix.arch}}-extensions 130 | path: | 131 | build/release/extension/duckdb-athena-extension/athena.duckdb_extension 132 | 133 | - name: configure aws credentials 134 | uses: aws-actions/configure-aws-credentials@v1 135 | with: 136 | role-to-assume: ${{ secrets.OIDC_ROLE_ARN }} 137 | aws-region: ${{ secrets.S3_REGION }} 138 | 139 | - name: Deploy 140 | env: 141 | BUCKET_NAME: ${{ secrets.S3_BUCKET }} 142 | run: | 143 | git config --global --add safe.directory '*' 144 | cd duckdb 145 | git fetch --tags 146 | export DUCKDB_VERSION=`git tag --points-at HEAD` 147 | export DUCKDB_VERSION=${DUCKDB_VERSION:=`git log -1 --format=%h`} 148 | cd .. 149 | if [[ "$BUCKET_NAME" == "" ]] ; then 150 | echo 'No bucket set, skipping' 151 | elif [[ "$GITHUB_REF" =~ ^(refs/tags/v.+)$ ]] ; then 152 | python3 -m pip install pip awscli 153 | ./scripts/extension-upload.sh athena ${{ github.ref_name }} $DUCKDB_VERSION ${{matrix.arch}} $BUCKET_NAME true 154 | elif [[ "$GITHUB_REF" =~ ^(refs/heads/main)$ ]] ; then 155 | python3 -m pip install pip awscli 156 | ./scripts/extension-upload.sh athena `git log -1 --format=%h` $DUCKDB_VERSION ${{matrix.arch}} $BUCKET_NAME false 157 | fi 158 | -------------------------------------------------------------------------------- /.github/workflows/Windows.yml: -------------------------------------------------------------------------------- 1 | name: Windows 2 | on: [push, pull_request] 3 | concurrency: 4 | group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ github.ref != 'refs/heads/main' || github.sha }} 5 | cancel-in-progress: true 6 | defaults: 7 | run: 8 | shell: bash 9 | 10 | # TODO: checkout duckdb_athena_rust/duckdb 11 | 12 | jobs: 13 | windows: 14 | name: Release 15 | runs-on: windows-latest 16 | # These permissions are needed to interact with GitHub's OIDC Token endpoint. 17 | permissions: 18 | id-token: write 19 | strategy: 20 | matrix: 21 | # Add commits/tags to build against other DuckDB versions 22 | duckdb_version: [ '' ] 23 | 24 | steps: 25 | - uses: actions/checkout@v3 26 | with: 27 | fetch-depth: 0 28 | submodules: 'true' 29 | 30 | - uses: actions/setup-python@v2 31 | with: 32 | python-version: '3.7' 33 | 34 | - name: Checkout DuckDB to version 35 | # Add commits/tags to build against other DuckDB versions 36 | if: ${{ matrix.duckdb_version != ''}} 37 | run: | 38 | cd duckdb 39 | git checkout ${{ matrix.duckdb_version }} 40 | cd ../duckdb_athena_rust/duckdb 41 | git checkout ${{ matrix.duckdb_version }} 42 | 43 | - name: Build extension 44 | run: | 45 | dir duckdb_athena_rust/duckdb/src/include 46 | make release 47 | 48 | - uses: actions/upload-artifact@v2 49 | with: 50 | name: linux-extensions-64-aarch64 51 | path: | 52 | build/release/extension/duckdb-athena-extension/athena.duckdb_extension 53 | 54 | - name: configure aws credentials 55 | uses: aws-actions/configure-aws-credentials@v1 56 | with: 57 | role-to-assume: ${{ secrets.OIDC_ROLE_ARN }} 58 | aws-region: ${{ secrets.S3_REGION }} 59 | 60 | - name: Deploy 61 | env: 62 | BUCKET_NAME: ${{ secrets.S3_BUCKET }} 63 | run: | 64 | cd duckdb 65 | git fetch --tags 66 | export DUCKDB_VERSION=`git tag --points-at HEAD` 67 | export DUCKDB_VERSION=${DUCKDB_VERSION:=`git log -1 --format=%h`} 68 | cd .. 69 | if [[ "$BUCKET_NAME" == "" ]] ; then 70 | echo 'No bucket set, skipping' 71 | elif [[ "$GITHUB_REF" =~ ^(refs/tags/v.+)$ ]] ; then 72 | python -m pip install awscli 73 | ./scripts/extension-upload.sh athena ${{ github.ref_name }} $DUCKDB_VERSION windows_amd64 $BUCKET_NAME true 74 | elif [[ "$GITHUB_REF" =~ ^(refs/heads/main)$ ]] ; then 75 | python -m pip install awscli 76 | ./scripts/extension-upload.sh athena `git log -1 --format=%h` $DUCKDB_VERSION windows_amd64 $BUCKET_NAME false 77 | fi 78 | -------------------------------------------------------------------------------- /.github/workflows/macOS.yml: -------------------------------------------------------------------------------- 1 | name: macOS 2 | on: [push, pull_request] 3 | concurrency: 4 | group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ github.ref != 'refs/heads/main' || github.sha }} 5 | cancel-in-progress: true 6 | defaults: 7 | run: 8 | shell: bash 9 | 10 | jobs: 11 | macos: 12 | name: macOS Release (Universal) 13 | runs-on: macos-latest 14 | # These permissions are needed to interact with GitHub's OIDC Token endpoint. 15 | permissions: 16 | id-token: write 17 | strategy: 18 | matrix: 19 | # Add commits/tags to build against other DuckDB versions 20 | duckdb_version: [ '' ] 21 | arch: ['amd64', 'arm64'] 22 | 23 | env: 24 | OSX_BUILD_UNIVERSAL: 1 25 | GEN: ninja 26 | 27 | steps: 28 | - uses: actions/checkout@v3 29 | with: 30 | fetch-depth: 0 31 | submodules: 'true' 32 | 33 | - name: Install Ninja 34 | run: brew install ninja 35 | 36 | - uses: actions/setup-python@v2 37 | with: 38 | python-version: '3.7' 39 | 40 | - name: Checkout DuckDB to version 41 | if: ${{ matrix.duckdb_version != ''}} 42 | run: | 43 | cd duckdb 44 | git checkout ${{ matrix.duckdb_version }} 45 | cd ../duckdb_athena_rust/duckdb 46 | git checkout ${{ matrix.duckdb_version }} 47 | 48 | # Build extension 49 | - name: Build extension 50 | env: 51 | OSX_BUILD_AARCH64: ${{ matrix.arch == 'arm64' && 1 || 0 }} 52 | shell: bash 53 | run: | 54 | if [[ "$OSX_BUILD_AARCH64" == "1" ]]; then rustup target add aarch64-apple-darwin; fi 55 | make release 56 | 57 | - name: configure aws credentials 58 | uses: aws-actions/configure-aws-credentials@v1 59 | with: 60 | role-to-assume: ${{ secrets.OIDC_ROLE_ARN }} 61 | aws-region: ${{ secrets.S3_REGION }} 62 | 63 | - name: Deploy 64 | env: 65 | BUCKET_NAME: ${{ secrets.S3_BUCKET }} 66 | run: | 67 | cd duckdb 68 | git fetch --tags 69 | export DUCKDB_VERSION=`git tag --points-at HEAD` 70 | echo $DUCKDB_VERSION 71 | export DUCKDB_VERSION=${DUCKDB_VERSION:=`git log -1 --format=%h`} 72 | echo $DUCKDB_VERSION 73 | cd .. 74 | if [[ "$BUCKET_NAME" == "" ]] ; then 75 | echo 'No bucket set, skipping' 76 | elif [[ "$GITHUB_REF" =~ ^(refs/tags/v.+)$ ]] ; then 77 | python -m pip install awscli 78 | ./scripts/extension-upload.sh athena ${{ github.ref_name }} $DUCKDB_VERSION osx_${{matrix.arch}} $BUCKET_NAME true 79 | elif [[ "$GITHUB_REF" =~ ^(refs/heads/main)$ ]] ; then 80 | python -m pip install awscli 81 | ./scripts/extension-upload.sh athena `git log -1 --format=%h` $DUCKDB_VERSION osx_${{matrix.arch}} $BUCKET_NAME false 82 | fi 83 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | /build -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "duckdb"] 2 | path = duckdb 3 | url = https://github.com/duckdb/duckdb.git 4 | tag = v1.1.1 5 | [submodule "extension-ci-tools"] 6 | path = extension-ci-tools 7 | url = https://github.com/duckdb/extension-ci-tools 8 | branch = v1.1.3 9 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2023 Lance Authors 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # Still need to use cmake to link to duckdb via `build_loadable_extension` macro. 16 | # 17 | 18 | cmake_minimum_required(VERSION 3.5) 19 | 20 | if (POLICY CMP0135) 21 | cmake_policy(SET CMP0135 NEW) 22 | endif () 23 | 24 | set(TARGET_NAME athena) 25 | project(${TARGET_NAME} VERSION 0.3) 26 | set(EXTENSION_NAME ${TARGET_NAME}_extension) 27 | set(LOADABLE_EXTENSION_NAME ${TARGET_NAME}_loadable_extension) 28 | 29 | if (APPLE) 30 | # POLICY CMP0042 31 | set(CMAKE_MACOSX_RPATH 1) 32 | # I think this is automatically handled by the duckdb Makefile/CMakefiles 33 | # SET(CMAKE_OSX_ARCHITECTURES "x86_64;arm64" CACHE STRING "Build architectures for Mac OS X" FORCE) 34 | endif() 35 | 36 | option(OSX_BUILD_AARCH64 "Build aarch64/arm64 binary on OSX." FALSE) 37 | if (OSX_BUILD_AARCH64) 38 | if (NOT APPLE) 39 | error("This only makes sense on OSX") 40 | endif() 41 | set(Rust_CARGO_TARGET "aarch64-apple-darwin") 42 | SET(CMAKE_OSX_ARCHITECTURES "arm64" CACHE STRING "Build architecture for Mac OS X" FORCE) 43 | else() 44 | SET(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE STRING "Build architectures for Mac OS X" FORCE) 45 | endif() 46 | 47 | include(FetchContent) 48 | 49 | FetchContent_Declare( 50 | Corrosion 51 | GIT_REPOSITORY https://github.com/corrosion-rs/corrosion.git 52 | GIT_TAG v0.5 # Optionally specify a commit hash, version tag or branch here 53 | ) 54 | set(BUILD_UNITTESTS FALSE) # Disable unit test build in duckdb 55 | 56 | FetchContent_MakeAvailable(Corrosion) 57 | 58 | #set(EXTERNAL_EXTENSION_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}) 59 | 60 | corrosion_import_crate(MANIFEST_PATH ${CMAKE_CURRENT_SOURCE_DIR}/Cargo.toml) 61 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/duckdb/src/include) 62 | include_directories(src/include) 63 | 64 | # Now again for aarch64/arm64 65 | # set(Rust_CARGO_TARGET "aarch64-apple-darwin") 66 | # corrosion_import_crate(MANIFEST_PATH ${CMAKE_CURRENT_SOURCE_DIR}/Cargo.toml) 67 | 68 | set(EXTENSION_SOURCES src/athena_extension.cpp src/include/athena_extension.hpp) 69 | 70 | SET(EXTENSION_STATIC_BUILD 1) 71 | set(PARAMETERS "-warnings") 72 | build_static_extension(${TARGET_NAME} ${EXTENSION_SOURCES}) 73 | build_loadable_extension(${TARGET_NAME} ${PARAMETERS} ${EXTENSION_SOURCES}) 74 | 75 | set_target_properties(${EXTENSION_NAME} PROPERTIES LINKER_LANGUAGE CXX) 76 | target_link_libraries(${EXTENSION_NAME} 77 | "${CMAKE_CURRENT_BINARY_DIR}/libduckdb_athena.a" 78 | duckdb_static 79 | ) 80 | target_link_libraries(${LOADABLE_EXTENSION_NAME} 81 | "${CMAKE_CURRENT_BINARY_DIR}/libduckdb_athena.a" 82 | duckdb_static 83 | ) 84 | 85 | if (APPLE) 86 | target_link_libraries(${EXTENSION_NAME} 87 | "-framework CoreFoundation" 88 | "-framework Security") 89 | endif() 90 | 91 | install( 92 | TARGETS ${EXTENSION_NAME} 93 | EXPORT "${DUCKDB_EXPORT_SET}" 94 | LIBRARY DESTINATION "${INSTALL_LIB_DIR}" 95 | ARCHIVE DESTINATION "${INSTALL_LIB_DIR}") 96 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 4 4 | 5 | [[package]] 6 | name = "addr2line" 7 | version = "0.24.2" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" 10 | dependencies = [ 11 | "gimli", 12 | ] 13 | 14 | [[package]] 15 | name = "adler2" 16 | version = "2.0.0" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" 19 | 20 | [[package]] 21 | name = "ahash" 22 | version = "0.7.8" 23 | source = "registry+https://github.com/rust-lang/crates.io-index" 24 | checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" 25 | dependencies = [ 26 | "getrandom", 27 | "once_cell", 28 | "version_check", 29 | ] 30 | 31 | [[package]] 32 | name = "ahash" 33 | version = "0.8.11" 34 | source = "registry+https://github.com/rust-lang/crates.io-index" 35 | checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" 36 | dependencies = [ 37 | "cfg-if", 38 | "const-random", 39 | "getrandom", 40 | "once_cell", 41 | "version_check", 42 | "zerocopy", 43 | ] 44 | 45 | [[package]] 46 | name = "aho-corasick" 47 | version = "1.1.3" 48 | source = "registry+https://github.com/rust-lang/crates.io-index" 49 | checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" 50 | dependencies = [ 51 | "memchr", 52 | ] 53 | 54 | [[package]] 55 | name = "android-tzdata" 56 | version = "0.1.1" 57 | source = "registry+https://github.com/rust-lang/crates.io-index" 58 | checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" 59 | 60 | [[package]] 61 | name = "android_system_properties" 62 | version = "0.1.5" 63 | source = "registry+https://github.com/rust-lang/crates.io-index" 64 | checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 65 | dependencies = [ 66 | "libc", 67 | ] 68 | 69 | [[package]] 70 | name = "anyhow" 71 | version = "1.0.94" 72 | source = "registry+https://github.com/rust-lang/crates.io-index" 73 | checksum = "c1fd03a028ef38ba2276dce7e33fcd6369c158a1bca17946c4b1b701891c1ff7" 74 | dependencies = [ 75 | "backtrace", 76 | ] 77 | 78 | [[package]] 79 | name = "arrayvec" 80 | version = "0.7.6" 81 | source = "registry+https://github.com/rust-lang/crates.io-index" 82 | checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" 83 | 84 | [[package]] 85 | name = "arrow" 86 | version = "53.3.0" 87 | source = "registry+https://github.com/rust-lang/crates.io-index" 88 | checksum = "c91839b07e474b3995035fd8ac33ee54f9c9ccbbb1ea33d9909c71bffdf1259d" 89 | dependencies = [ 90 | "arrow-arith", 91 | "arrow-array", 92 | "arrow-buffer", 93 | "arrow-cast", 94 | "arrow-data", 95 | "arrow-ord", 96 | "arrow-row", 97 | "arrow-schema", 98 | "arrow-select", 99 | "arrow-string", 100 | ] 101 | 102 | [[package]] 103 | name = "arrow-arith" 104 | version = "53.3.0" 105 | source = "registry+https://github.com/rust-lang/crates.io-index" 106 | checksum = "855c57c4efd26722b044dcd3e348252560e3e0333087fb9f6479dc0bf744054f" 107 | dependencies = [ 108 | "arrow-array", 109 | "arrow-buffer", 110 | "arrow-data", 111 | "arrow-schema", 112 | "chrono", 113 | "half", 114 | "num", 115 | ] 116 | 117 | [[package]] 118 | name = "arrow-array" 119 | version = "53.3.0" 120 | source = "registry+https://github.com/rust-lang/crates.io-index" 121 | checksum = "bd03279cea46569acf9295f6224fbc370c5df184b4d2ecfe97ccb131d5615a7f" 122 | dependencies = [ 123 | "ahash 0.8.11", 124 | "arrow-buffer", 125 | "arrow-data", 126 | "arrow-schema", 127 | "chrono", 128 | "half", 129 | "hashbrown 0.15.2", 130 | "num", 131 | ] 132 | 133 | [[package]] 134 | name = "arrow-buffer" 135 | version = "53.3.0" 136 | source = "registry+https://github.com/rust-lang/crates.io-index" 137 | checksum = "9e4a9b9b1d6d7117f6138e13bc4dd5daa7f94e671b70e8c9c4dc37b4f5ecfc16" 138 | dependencies = [ 139 | "bytes", 140 | "half", 141 | "num", 142 | ] 143 | 144 | [[package]] 145 | name = "arrow-cast" 146 | version = "53.3.0" 147 | source = "registry+https://github.com/rust-lang/crates.io-index" 148 | checksum = "bc70e39916e60c5b7af7a8e2719e3ae589326039e1e863675a008bee5ffe90fd" 149 | dependencies = [ 150 | "arrow-array", 151 | "arrow-buffer", 152 | "arrow-data", 153 | "arrow-schema", 154 | "arrow-select", 155 | "atoi", 156 | "base64 0.22.1", 157 | "chrono", 158 | "comfy-table", 159 | "half", 160 | "lexical-core", 161 | "num", 162 | "ryu", 163 | ] 164 | 165 | [[package]] 166 | name = "arrow-data" 167 | version = "53.3.0" 168 | source = "registry+https://github.com/rust-lang/crates.io-index" 169 | checksum = "e4e75edf21ffd53744a9b8e3ed11101f610e7ceb1a29860432824f1834a1f623" 170 | dependencies = [ 171 | "arrow-buffer", 172 | "arrow-schema", 173 | "half", 174 | "num", 175 | ] 176 | 177 | [[package]] 178 | name = "arrow-ord" 179 | version = "53.3.0" 180 | source = "registry+https://github.com/rust-lang/crates.io-index" 181 | checksum = "ece7b5bc1180e6d82d1a60e1688c199829e8842e38497563c3ab6ea813e527fd" 182 | dependencies = [ 183 | "arrow-array", 184 | "arrow-buffer", 185 | "arrow-data", 186 | "arrow-schema", 187 | "arrow-select", 188 | "half", 189 | "num", 190 | ] 191 | 192 | [[package]] 193 | name = "arrow-row" 194 | version = "53.3.0" 195 | source = "registry+https://github.com/rust-lang/crates.io-index" 196 | checksum = "745c114c8f0e8ce211c83389270de6fbe96a9088a7b32c2a041258a443fe83ff" 197 | dependencies = [ 198 | "ahash 0.8.11", 199 | "arrow-array", 200 | "arrow-buffer", 201 | "arrow-data", 202 | "arrow-schema", 203 | "half", 204 | ] 205 | 206 | [[package]] 207 | name = "arrow-schema" 208 | version = "53.3.0" 209 | source = "registry+https://github.com/rust-lang/crates.io-index" 210 | checksum = "b95513080e728e4cec37f1ff5af4f12c9688d47795d17cda80b6ec2cf74d4678" 211 | dependencies = [ 212 | "bitflags", 213 | ] 214 | 215 | [[package]] 216 | name = "arrow-select" 217 | version = "53.3.0" 218 | source = "registry+https://github.com/rust-lang/crates.io-index" 219 | checksum = "8e415279094ea70323c032c6e739c48ad8d80e78a09bef7117b8718ad5bf3722" 220 | dependencies = [ 221 | "ahash 0.8.11", 222 | "arrow-array", 223 | "arrow-buffer", 224 | "arrow-data", 225 | "arrow-schema", 226 | "num", 227 | ] 228 | 229 | [[package]] 230 | name = "arrow-string" 231 | version = "53.3.0" 232 | source = "registry+https://github.com/rust-lang/crates.io-index" 233 | checksum = "11d956cae7002eb8d83a27dbd34daaea1cf5b75852f0b84deb4d93a276e92bbf" 234 | dependencies = [ 235 | "arrow-array", 236 | "arrow-buffer", 237 | "arrow-data", 238 | "arrow-schema", 239 | "arrow-select", 240 | "memchr", 241 | "num", 242 | "regex", 243 | "regex-syntax", 244 | ] 245 | 246 | [[package]] 247 | name = "atoi" 248 | version = "2.0.0" 249 | source = "registry+https://github.com/rust-lang/crates.io-index" 250 | checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" 251 | dependencies = [ 252 | "num-traits", 253 | ] 254 | 255 | [[package]] 256 | name = "autocfg" 257 | version = "1.4.0" 258 | source = "registry+https://github.com/rust-lang/crates.io-index" 259 | checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" 260 | 261 | [[package]] 262 | name = "aws-config" 263 | version = "0.54.1" 264 | source = "registry+https://github.com/rust-lang/crates.io-index" 265 | checksum = "3c3d1e2a1f1ab3ac6c4b884e37413eaa03eb9d901e4fc68ee8f5c1d49721680e" 266 | dependencies = [ 267 | "aws-credential-types", 268 | "aws-http", 269 | "aws-sdk-sso", 270 | "aws-sdk-sts", 271 | "aws-smithy-async", 272 | "aws-smithy-client", 273 | "aws-smithy-http", 274 | "aws-smithy-http-tower", 275 | "aws-smithy-json", 276 | "aws-smithy-types", 277 | "aws-types", 278 | "bytes", 279 | "hex", 280 | "http", 281 | "hyper", 282 | "ring 0.16.20", 283 | "time", 284 | "tokio", 285 | "tower", 286 | "tracing", 287 | "zeroize", 288 | ] 289 | 290 | [[package]] 291 | name = "aws-credential-types" 292 | version = "0.54.1" 293 | source = "registry+https://github.com/rust-lang/crates.io-index" 294 | checksum = "bb0696a0523a39a19087747e4dafda0362dc867531e3d72a3f195564c84e5e08" 295 | dependencies = [ 296 | "aws-smithy-async", 297 | "aws-smithy-types", 298 | "tokio", 299 | "tracing", 300 | "zeroize", 301 | ] 302 | 303 | [[package]] 304 | name = "aws-endpoint" 305 | version = "0.54.1" 306 | source = "registry+https://github.com/rust-lang/crates.io-index" 307 | checksum = "80a4f935ab6a1919fbfd6102a80c4fccd9ff5f47f94ba154074afe1051903261" 308 | dependencies = [ 309 | "aws-smithy-http", 310 | "aws-smithy-types", 311 | "aws-types", 312 | "http", 313 | "regex", 314 | "tracing", 315 | ] 316 | 317 | [[package]] 318 | name = "aws-http" 319 | version = "0.54.1" 320 | source = "registry+https://github.com/rust-lang/crates.io-index" 321 | checksum = "82976ca4e426ee9ca3ffcf919d9b2c8d14d0cd80d43cc02173737a8f07f28d4d" 322 | dependencies = [ 323 | "aws-credential-types", 324 | "aws-smithy-http", 325 | "aws-smithy-types", 326 | "aws-types", 327 | "bytes", 328 | "http", 329 | "http-body", 330 | "lazy_static", 331 | "percent-encoding", 332 | "pin-project-lite", 333 | "tracing", 334 | ] 335 | 336 | [[package]] 337 | name = "aws-sdk-athena" 338 | version = "0.24.0" 339 | source = "registry+https://github.com/rust-lang/crates.io-index" 340 | checksum = "7157f304a4e4c53d741f191c03ba112321ad60ca2dbeae55cbdd3cfb8bbcc046" 341 | dependencies = [ 342 | "aws-credential-types", 343 | "aws-endpoint", 344 | "aws-http", 345 | "aws-sig-auth", 346 | "aws-smithy-async", 347 | "aws-smithy-client", 348 | "aws-smithy-http", 349 | "aws-smithy-http-tower", 350 | "aws-smithy-json", 351 | "aws-smithy-types", 352 | "aws-types", 353 | "bytes", 354 | "fastrand", 355 | "http", 356 | "regex", 357 | "tokio-stream", 358 | "tower", 359 | ] 360 | 361 | [[package]] 362 | name = "aws-sdk-glue" 363 | version = "0.24.0" 364 | source = "registry+https://github.com/rust-lang/crates.io-index" 365 | checksum = "cf3fb495c732638d4f2e64f76068400ffd9fa374b9e8fd201cc47fc349b514cf" 366 | dependencies = [ 367 | "aws-credential-types", 368 | "aws-endpoint", 369 | "aws-http", 370 | "aws-sig-auth", 371 | "aws-smithy-async", 372 | "aws-smithy-client", 373 | "aws-smithy-http", 374 | "aws-smithy-http-tower", 375 | "aws-smithy-json", 376 | "aws-smithy-types", 377 | "aws-types", 378 | "bytes", 379 | "http", 380 | "regex", 381 | "tokio-stream", 382 | "tower", 383 | ] 384 | 385 | [[package]] 386 | name = "aws-sdk-sso" 387 | version = "0.24.0" 388 | source = "registry+https://github.com/rust-lang/crates.io-index" 389 | checksum = "ca0119bacf0c42f587506769390983223ba834e605f049babe514b2bd646dbb2" 390 | dependencies = [ 391 | "aws-credential-types", 392 | "aws-endpoint", 393 | "aws-http", 394 | "aws-sig-auth", 395 | "aws-smithy-async", 396 | "aws-smithy-client", 397 | "aws-smithy-http", 398 | "aws-smithy-http-tower", 399 | "aws-smithy-json", 400 | "aws-smithy-types", 401 | "aws-types", 402 | "bytes", 403 | "http", 404 | "regex", 405 | "tokio-stream", 406 | "tower", 407 | ] 408 | 409 | [[package]] 410 | name = "aws-sdk-sts" 411 | version = "0.24.0" 412 | source = "registry+https://github.com/rust-lang/crates.io-index" 413 | checksum = "270b6a33969ebfcb193512fbd5e8ee5306888ad6c6d5d775cdbfb2d50d94de26" 414 | dependencies = [ 415 | "aws-credential-types", 416 | "aws-endpoint", 417 | "aws-http", 418 | "aws-sig-auth", 419 | "aws-smithy-async", 420 | "aws-smithy-client", 421 | "aws-smithy-http", 422 | "aws-smithy-http-tower", 423 | "aws-smithy-json", 424 | "aws-smithy-query", 425 | "aws-smithy-types", 426 | "aws-smithy-xml", 427 | "aws-types", 428 | "bytes", 429 | "http", 430 | "regex", 431 | "tower", 432 | "tracing", 433 | ] 434 | 435 | [[package]] 436 | name = "aws-sig-auth" 437 | version = "0.54.1" 438 | source = "registry+https://github.com/rust-lang/crates.io-index" 439 | checksum = "660a02a98ab1af83bd8d714afbab2d502ba9b18c49e7e4cddd6bf8837ff778cb" 440 | dependencies = [ 441 | "aws-credential-types", 442 | "aws-sigv4", 443 | "aws-smithy-http", 444 | "aws-types", 445 | "http", 446 | "tracing", 447 | ] 448 | 449 | [[package]] 450 | name = "aws-sigv4" 451 | version = "0.54.2" 452 | source = "registry+https://github.com/rust-lang/crates.io-index" 453 | checksum = "86529e7b64d902efea8fff52c1b2529368d04f90305cf632729e3713f6b57dc0" 454 | dependencies = [ 455 | "aws-smithy-http", 456 | "form_urlencoded", 457 | "hex", 458 | "hmac", 459 | "http", 460 | "once_cell", 461 | "percent-encoding", 462 | "regex", 463 | "sha2", 464 | "time", 465 | "tracing", 466 | ] 467 | 468 | [[package]] 469 | name = "aws-smithy-async" 470 | version = "0.54.4" 471 | source = "registry+https://github.com/rust-lang/crates.io-index" 472 | checksum = "63c712a28a4f2f2139759235c08bf98aca99d4fdf1b13c78c5f95613df0a5db9" 473 | dependencies = [ 474 | "futures-util", 475 | "pin-project-lite", 476 | "tokio", 477 | "tokio-stream", 478 | ] 479 | 480 | [[package]] 481 | name = "aws-smithy-client" 482 | version = "0.54.4" 483 | source = "registry+https://github.com/rust-lang/crates.io-index" 484 | checksum = "104ca17f56cde00a10207169697dfe9c6810db339d52fb352707e64875b30a44" 485 | dependencies = [ 486 | "aws-smithy-async", 487 | "aws-smithy-http", 488 | "aws-smithy-http-tower", 489 | "aws-smithy-types", 490 | "bytes", 491 | "fastrand", 492 | "http", 493 | "http-body", 494 | "hyper", 495 | "hyper-rustls", 496 | "lazy_static", 497 | "pin-project-lite", 498 | "tokio", 499 | "tower", 500 | "tracing", 501 | ] 502 | 503 | [[package]] 504 | name = "aws-smithy-http" 505 | version = "0.54.4" 506 | source = "registry+https://github.com/rust-lang/crates.io-index" 507 | checksum = "873f316f1833add0d3aa54ed1b0cd252ddd88c792a0cf839886400099971e844" 508 | dependencies = [ 509 | "aws-smithy-types", 510 | "bytes", 511 | "bytes-utils", 512 | "futures-core", 513 | "http", 514 | "http-body", 515 | "hyper", 516 | "once_cell", 517 | "percent-encoding", 518 | "pin-project-lite", 519 | "pin-utils", 520 | "tokio", 521 | "tokio-util", 522 | "tracing", 523 | ] 524 | 525 | [[package]] 526 | name = "aws-smithy-http-tower" 527 | version = "0.54.4" 528 | source = "registry+https://github.com/rust-lang/crates.io-index" 529 | checksum = "4f38231d3f5dac9ac7976f44e12803add1385119ffca9e5f050d8e980733d164" 530 | dependencies = [ 531 | "aws-smithy-http", 532 | "aws-smithy-types", 533 | "bytes", 534 | "http", 535 | "http-body", 536 | "pin-project-lite", 537 | "tower", 538 | "tracing", 539 | ] 540 | 541 | [[package]] 542 | name = "aws-smithy-json" 543 | version = "0.54.4" 544 | source = "registry+https://github.com/rust-lang/crates.io-index" 545 | checksum = "4bd83ff2b79e9f729746fcc8ad798676b68fe6ea72986571569a5306a277a182" 546 | dependencies = [ 547 | "aws-smithy-types", 548 | ] 549 | 550 | [[package]] 551 | name = "aws-smithy-query" 552 | version = "0.54.4" 553 | source = "registry+https://github.com/rust-lang/crates.io-index" 554 | checksum = "a2f0445dafe9d2cd50b44339ae3c3ed46549aad8ac696c52ad660b3e7ae8682b" 555 | dependencies = [ 556 | "aws-smithy-types", 557 | "urlencoding", 558 | ] 559 | 560 | [[package]] 561 | name = "aws-smithy-types" 562 | version = "0.54.4" 563 | source = "registry+https://github.com/rust-lang/crates.io-index" 564 | checksum = "8161232eda10290f5136610a1eb9de56aceaccd70c963a26a260af20ac24794f" 565 | dependencies = [ 566 | "base64-simd", 567 | "itoa", 568 | "num-integer", 569 | "ryu", 570 | "time", 571 | ] 572 | 573 | [[package]] 574 | name = "aws-smithy-xml" 575 | version = "0.54.4" 576 | source = "registry+https://github.com/rust-lang/crates.io-index" 577 | checksum = "343ffe9a9bb3f542675f4df0e0d5933513d6ad038ca3907ad1767ba690a99684" 578 | dependencies = [ 579 | "xmlparser", 580 | ] 581 | 582 | [[package]] 583 | name = "aws-types" 584 | version = "0.54.1" 585 | source = "registry+https://github.com/rust-lang/crates.io-index" 586 | checksum = "f8f15b34253b68cde08e39b0627cc6101bcca64351229484b4743392c035d057" 587 | dependencies = [ 588 | "aws-credential-types", 589 | "aws-smithy-async", 590 | "aws-smithy-client", 591 | "aws-smithy-http", 592 | "aws-smithy-types", 593 | "http", 594 | "rustc_version", 595 | "tracing", 596 | ] 597 | 598 | [[package]] 599 | name = "backtrace" 600 | version = "0.3.74" 601 | source = "registry+https://github.com/rust-lang/crates.io-index" 602 | checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" 603 | dependencies = [ 604 | "addr2line", 605 | "cfg-if", 606 | "libc", 607 | "miniz_oxide", 608 | "object", 609 | "rustc-demangle", 610 | "windows-targets", 611 | ] 612 | 613 | [[package]] 614 | name = "base64" 615 | version = "0.21.7" 616 | source = "registry+https://github.com/rust-lang/crates.io-index" 617 | checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" 618 | 619 | [[package]] 620 | name = "base64" 621 | version = "0.22.1" 622 | source = "registry+https://github.com/rust-lang/crates.io-index" 623 | checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" 624 | 625 | [[package]] 626 | name = "base64-simd" 627 | version = "0.8.0" 628 | source = "registry+https://github.com/rust-lang/crates.io-index" 629 | checksum = "339abbe78e73178762e23bea9dfd08e697eb3f3301cd4be981c0f78ba5859195" 630 | dependencies = [ 631 | "outref", 632 | "vsimd", 633 | ] 634 | 635 | [[package]] 636 | name = "bindgen" 637 | version = "0.71.1" 638 | source = "registry+https://github.com/rust-lang/crates.io-index" 639 | checksum = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3" 640 | dependencies = [ 641 | "bitflags", 642 | "cexpr", 643 | "clang-sys", 644 | "itertools", 645 | "log", 646 | "prettyplease", 647 | "proc-macro2", 648 | "quote", 649 | "regex", 650 | "rustc-hash", 651 | "shlex", 652 | "syn 2.0.90", 653 | ] 654 | 655 | [[package]] 656 | name = "bitflags" 657 | version = "2.6.0" 658 | source = "registry+https://github.com/rust-lang/crates.io-index" 659 | checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" 660 | 661 | [[package]] 662 | name = "bitvec" 663 | version = "1.0.1" 664 | source = "registry+https://github.com/rust-lang/crates.io-index" 665 | checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" 666 | dependencies = [ 667 | "funty", 668 | "radium", 669 | "tap", 670 | "wyz", 671 | ] 672 | 673 | [[package]] 674 | name = "block-buffer" 675 | version = "0.10.4" 676 | source = "registry+https://github.com/rust-lang/crates.io-index" 677 | checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 678 | dependencies = [ 679 | "generic-array", 680 | ] 681 | 682 | [[package]] 683 | name = "borsh" 684 | version = "1.5.3" 685 | source = "registry+https://github.com/rust-lang/crates.io-index" 686 | checksum = "2506947f73ad44e344215ccd6403ac2ae18cd8e046e581a441bf8d199f257f03" 687 | dependencies = [ 688 | "borsh-derive", 689 | "cfg_aliases", 690 | ] 691 | 692 | [[package]] 693 | name = "borsh-derive" 694 | version = "1.5.3" 695 | source = "registry+https://github.com/rust-lang/crates.io-index" 696 | checksum = "c2593a3b8b938bd68373196c9832f516be11fa487ef4ae745eb282e6a56a7244" 697 | dependencies = [ 698 | "once_cell", 699 | "proc-macro-crate", 700 | "proc-macro2", 701 | "quote", 702 | "syn 2.0.90", 703 | ] 704 | 705 | [[package]] 706 | name = "build_script" 707 | version = "0.2.0" 708 | source = "registry+https://github.com/rust-lang/crates.io-index" 709 | checksum = "163ca3c07a6939838dfa322e1e36cd434cc2b625dacb051b8e8b893bbbb8aa62" 710 | dependencies = [ 711 | "once_cell", 712 | ] 713 | 714 | [[package]] 715 | name = "bumpalo" 716 | version = "3.16.0" 717 | source = "registry+https://github.com/rust-lang/crates.io-index" 718 | checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" 719 | 720 | [[package]] 721 | name = "bytecheck" 722 | version = "0.6.12" 723 | source = "registry+https://github.com/rust-lang/crates.io-index" 724 | checksum = "23cdc57ce23ac53c931e88a43d06d070a6fd142f2617be5855eb75efc9beb1c2" 725 | dependencies = [ 726 | "bytecheck_derive", 727 | "ptr_meta", 728 | "simdutf8", 729 | ] 730 | 731 | [[package]] 732 | name = "bytecheck_derive" 733 | version = "0.6.12" 734 | source = "registry+https://github.com/rust-lang/crates.io-index" 735 | checksum = "3db406d29fbcd95542e92559bed4d8ad92636d1ca8b3b72ede10b4bcc010e659" 736 | dependencies = [ 737 | "proc-macro2", 738 | "quote", 739 | "syn 1.0.109", 740 | ] 741 | 742 | [[package]] 743 | name = "byteorder" 744 | version = "1.5.0" 745 | source = "registry+https://github.com/rust-lang/crates.io-index" 746 | checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" 747 | 748 | [[package]] 749 | name = "bytes" 750 | version = "1.9.0" 751 | source = "registry+https://github.com/rust-lang/crates.io-index" 752 | checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" 753 | 754 | [[package]] 755 | name = "bytes-utils" 756 | version = "0.1.4" 757 | source = "registry+https://github.com/rust-lang/crates.io-index" 758 | checksum = "7dafe3a8757b027e2be6e4e5601ed563c55989fcf1546e933c66c8eb3a058d35" 759 | dependencies = [ 760 | "bytes", 761 | "either", 762 | ] 763 | 764 | [[package]] 765 | name = "cast" 766 | version = "0.3.0" 767 | source = "registry+https://github.com/rust-lang/crates.io-index" 768 | checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" 769 | 770 | [[package]] 771 | name = "cc" 772 | version = "1.2.5" 773 | source = "registry+https://github.com/rust-lang/crates.io-index" 774 | checksum = "c31a0499c1dc64f458ad13872de75c0eb7e3fdb0e67964610c914b034fc5956e" 775 | dependencies = [ 776 | "jobserver", 777 | "libc", 778 | "shlex", 779 | ] 780 | 781 | [[package]] 782 | name = "cexpr" 783 | version = "0.6.0" 784 | source = "registry+https://github.com/rust-lang/crates.io-index" 785 | checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" 786 | dependencies = [ 787 | "nom", 788 | ] 789 | 790 | [[package]] 791 | name = "cfg-if" 792 | version = "1.0.0" 793 | source = "registry+https://github.com/rust-lang/crates.io-index" 794 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 795 | 796 | [[package]] 797 | name = "cfg_aliases" 798 | version = "0.2.1" 799 | source = "registry+https://github.com/rust-lang/crates.io-index" 800 | checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" 801 | 802 | [[package]] 803 | name = "chrono" 804 | version = "0.4.39" 805 | source = "registry+https://github.com/rust-lang/crates.io-index" 806 | checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" 807 | dependencies = [ 808 | "android-tzdata", 809 | "iana-time-zone", 810 | "num-traits", 811 | "windows-targets", 812 | ] 813 | 814 | [[package]] 815 | name = "clang-sys" 816 | version = "1.8.1" 817 | source = "registry+https://github.com/rust-lang/crates.io-index" 818 | checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" 819 | dependencies = [ 820 | "glob", 821 | "libc", 822 | "libloading", 823 | ] 824 | 825 | [[package]] 826 | name = "comfy-table" 827 | version = "7.1.3" 828 | source = "registry+https://github.com/rust-lang/crates.io-index" 829 | checksum = "24f165e7b643266ea80cb858aed492ad9280e3e05ce24d4a99d7d7b889b6a4d9" 830 | dependencies = [ 831 | "strum 0.26.3", 832 | "strum_macros 0.26.4", 833 | "unicode-width", 834 | ] 835 | 836 | [[package]] 837 | name = "const-random" 838 | version = "0.1.18" 839 | source = "registry+https://github.com/rust-lang/crates.io-index" 840 | checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359" 841 | dependencies = [ 842 | "const-random-macro", 843 | ] 844 | 845 | [[package]] 846 | name = "const-random-macro" 847 | version = "0.1.16" 848 | source = "registry+https://github.com/rust-lang/crates.io-index" 849 | checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" 850 | dependencies = [ 851 | "getrandom", 852 | "once_cell", 853 | "tiny-keccak", 854 | ] 855 | 856 | [[package]] 857 | name = "core-foundation" 858 | version = "0.9.4" 859 | source = "registry+https://github.com/rust-lang/crates.io-index" 860 | checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" 861 | dependencies = [ 862 | "core-foundation-sys", 863 | "libc", 864 | ] 865 | 866 | [[package]] 867 | name = "core-foundation-sys" 868 | version = "0.8.7" 869 | source = "registry+https://github.com/rust-lang/crates.io-index" 870 | checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" 871 | 872 | [[package]] 873 | name = "cpufeatures" 874 | version = "0.2.16" 875 | source = "registry+https://github.com/rust-lang/crates.io-index" 876 | checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" 877 | dependencies = [ 878 | "libc", 879 | ] 880 | 881 | [[package]] 882 | name = "crc32fast" 883 | version = "1.4.2" 884 | source = "registry+https://github.com/rust-lang/crates.io-index" 885 | checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" 886 | dependencies = [ 887 | "cfg-if", 888 | ] 889 | 890 | [[package]] 891 | name = "crunchy" 892 | version = "0.2.2" 893 | source = "registry+https://github.com/rust-lang/crates.io-index" 894 | checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" 895 | 896 | [[package]] 897 | name = "crypto-common" 898 | version = "0.1.6" 899 | source = "registry+https://github.com/rust-lang/crates.io-index" 900 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 901 | dependencies = [ 902 | "generic-array", 903 | "typenum", 904 | ] 905 | 906 | [[package]] 907 | name = "deranged" 908 | version = "0.3.11" 909 | source = "registry+https://github.com/rust-lang/crates.io-index" 910 | checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" 911 | dependencies = [ 912 | "powerfmt", 913 | ] 914 | 915 | [[package]] 916 | name = "digest" 917 | version = "0.10.7" 918 | source = "registry+https://github.com/rust-lang/crates.io-index" 919 | checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 920 | dependencies = [ 921 | "block-buffer", 922 | "crypto-common", 923 | "subtle", 924 | ] 925 | 926 | [[package]] 927 | name = "duckdb" 928 | version = "1.1.1" 929 | source = "registry+https://github.com/rust-lang/crates.io-index" 930 | checksum = "86844939330ba6ce345c4b5333d3be45c4f0c092779bf9617bba92efb8b841f5" 931 | dependencies = [ 932 | "arrow", 933 | "cast", 934 | "fallible-iterator", 935 | "fallible-streaming-iterator", 936 | "hashlink", 937 | "libduckdb-sys", 938 | "memchr", 939 | "num-integer", 940 | "rust_decimal", 941 | "smallvec", 942 | "strum 0.25.0", 943 | ] 944 | 945 | [[package]] 946 | name = "duckdb-athena" 947 | version = "0.1.0" 948 | dependencies = [ 949 | "anyhow", 950 | "aws-config", 951 | "aws-sdk-athena", 952 | "aws-sdk-glue", 953 | "duckdb_athena_rust", 954 | "futures", 955 | "lazy_static", 956 | "tokio", 957 | ] 958 | 959 | [[package]] 960 | name = "duckdb_athena_rust" 961 | version = "0.1.0" 962 | dependencies = [ 963 | "bindgen", 964 | "build_script", 965 | "cc", 966 | "duckdb", 967 | "libduckdb-sys", 968 | ] 969 | 970 | [[package]] 971 | name = "either" 972 | version = "1.13.0" 973 | source = "registry+https://github.com/rust-lang/crates.io-index" 974 | checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" 975 | 976 | [[package]] 977 | name = "equivalent" 978 | version = "1.0.1" 979 | source = "registry+https://github.com/rust-lang/crates.io-index" 980 | checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" 981 | 982 | [[package]] 983 | name = "errno" 984 | version = "0.3.10" 985 | source = "registry+https://github.com/rust-lang/crates.io-index" 986 | checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" 987 | dependencies = [ 988 | "libc", 989 | "windows-sys 0.59.0", 990 | ] 991 | 992 | [[package]] 993 | name = "fallible-iterator" 994 | version = "0.3.0" 995 | source = "registry+https://github.com/rust-lang/crates.io-index" 996 | checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" 997 | 998 | [[package]] 999 | name = "fallible-streaming-iterator" 1000 | version = "0.1.9" 1001 | source = "registry+https://github.com/rust-lang/crates.io-index" 1002 | checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" 1003 | 1004 | [[package]] 1005 | name = "fastrand" 1006 | version = "1.9.0" 1007 | source = "registry+https://github.com/rust-lang/crates.io-index" 1008 | checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" 1009 | dependencies = [ 1010 | "instant", 1011 | ] 1012 | 1013 | [[package]] 1014 | name = "filetime" 1015 | version = "0.2.25" 1016 | source = "registry+https://github.com/rust-lang/crates.io-index" 1017 | checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" 1018 | dependencies = [ 1019 | "cfg-if", 1020 | "libc", 1021 | "libredox", 1022 | "windows-sys 0.59.0", 1023 | ] 1024 | 1025 | [[package]] 1026 | name = "flate2" 1027 | version = "1.0.35" 1028 | source = "registry+https://github.com/rust-lang/crates.io-index" 1029 | checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" 1030 | dependencies = [ 1031 | "crc32fast", 1032 | "miniz_oxide", 1033 | ] 1034 | 1035 | [[package]] 1036 | name = "fnv" 1037 | version = "1.0.7" 1038 | source = "registry+https://github.com/rust-lang/crates.io-index" 1039 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 1040 | 1041 | [[package]] 1042 | name = "form_urlencoded" 1043 | version = "1.2.1" 1044 | source = "registry+https://github.com/rust-lang/crates.io-index" 1045 | checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" 1046 | dependencies = [ 1047 | "percent-encoding", 1048 | ] 1049 | 1050 | [[package]] 1051 | name = "funty" 1052 | version = "2.0.0" 1053 | source = "registry+https://github.com/rust-lang/crates.io-index" 1054 | checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" 1055 | 1056 | [[package]] 1057 | name = "futures" 1058 | version = "0.3.31" 1059 | source = "registry+https://github.com/rust-lang/crates.io-index" 1060 | checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" 1061 | dependencies = [ 1062 | "futures-channel", 1063 | "futures-core", 1064 | "futures-executor", 1065 | "futures-io", 1066 | "futures-sink", 1067 | "futures-task", 1068 | "futures-util", 1069 | ] 1070 | 1071 | [[package]] 1072 | name = "futures-channel" 1073 | version = "0.3.31" 1074 | source = "registry+https://github.com/rust-lang/crates.io-index" 1075 | checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" 1076 | dependencies = [ 1077 | "futures-core", 1078 | "futures-sink", 1079 | ] 1080 | 1081 | [[package]] 1082 | name = "futures-core" 1083 | version = "0.3.31" 1084 | source = "registry+https://github.com/rust-lang/crates.io-index" 1085 | checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" 1086 | 1087 | [[package]] 1088 | name = "futures-executor" 1089 | version = "0.3.31" 1090 | source = "registry+https://github.com/rust-lang/crates.io-index" 1091 | checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" 1092 | dependencies = [ 1093 | "futures-core", 1094 | "futures-task", 1095 | "futures-util", 1096 | ] 1097 | 1098 | [[package]] 1099 | name = "futures-io" 1100 | version = "0.3.31" 1101 | source = "registry+https://github.com/rust-lang/crates.io-index" 1102 | checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" 1103 | 1104 | [[package]] 1105 | name = "futures-macro" 1106 | version = "0.3.31" 1107 | source = "registry+https://github.com/rust-lang/crates.io-index" 1108 | checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" 1109 | dependencies = [ 1110 | "proc-macro2", 1111 | "quote", 1112 | "syn 2.0.90", 1113 | ] 1114 | 1115 | [[package]] 1116 | name = "futures-sink" 1117 | version = "0.3.31" 1118 | source = "registry+https://github.com/rust-lang/crates.io-index" 1119 | checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" 1120 | 1121 | [[package]] 1122 | name = "futures-task" 1123 | version = "0.3.31" 1124 | source = "registry+https://github.com/rust-lang/crates.io-index" 1125 | checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" 1126 | 1127 | [[package]] 1128 | name = "futures-util" 1129 | version = "0.3.31" 1130 | source = "registry+https://github.com/rust-lang/crates.io-index" 1131 | checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" 1132 | dependencies = [ 1133 | "futures-channel", 1134 | "futures-core", 1135 | "futures-io", 1136 | "futures-macro", 1137 | "futures-sink", 1138 | "futures-task", 1139 | "memchr", 1140 | "pin-project-lite", 1141 | "pin-utils", 1142 | "slab", 1143 | ] 1144 | 1145 | [[package]] 1146 | name = "generic-array" 1147 | version = "0.14.7" 1148 | source = "registry+https://github.com/rust-lang/crates.io-index" 1149 | checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 1150 | dependencies = [ 1151 | "typenum", 1152 | "version_check", 1153 | ] 1154 | 1155 | [[package]] 1156 | name = "getrandom" 1157 | version = "0.2.15" 1158 | source = "registry+https://github.com/rust-lang/crates.io-index" 1159 | checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" 1160 | dependencies = [ 1161 | "cfg-if", 1162 | "libc", 1163 | "wasi", 1164 | ] 1165 | 1166 | [[package]] 1167 | name = "gimli" 1168 | version = "0.31.1" 1169 | source = "registry+https://github.com/rust-lang/crates.io-index" 1170 | checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" 1171 | 1172 | [[package]] 1173 | name = "glob" 1174 | version = "0.3.1" 1175 | source = "registry+https://github.com/rust-lang/crates.io-index" 1176 | checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" 1177 | 1178 | [[package]] 1179 | name = "h2" 1180 | version = "0.3.26" 1181 | source = "registry+https://github.com/rust-lang/crates.io-index" 1182 | checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" 1183 | dependencies = [ 1184 | "bytes", 1185 | "fnv", 1186 | "futures-core", 1187 | "futures-sink", 1188 | "futures-util", 1189 | "http", 1190 | "indexmap", 1191 | "slab", 1192 | "tokio", 1193 | "tokio-util", 1194 | "tracing", 1195 | ] 1196 | 1197 | [[package]] 1198 | name = "half" 1199 | version = "2.4.1" 1200 | source = "registry+https://github.com/rust-lang/crates.io-index" 1201 | checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" 1202 | dependencies = [ 1203 | "cfg-if", 1204 | "crunchy", 1205 | "num-traits", 1206 | ] 1207 | 1208 | [[package]] 1209 | name = "hashbrown" 1210 | version = "0.12.3" 1211 | source = "registry+https://github.com/rust-lang/crates.io-index" 1212 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 1213 | dependencies = [ 1214 | "ahash 0.7.8", 1215 | ] 1216 | 1217 | [[package]] 1218 | name = "hashbrown" 1219 | version = "0.14.5" 1220 | source = "registry+https://github.com/rust-lang/crates.io-index" 1221 | checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" 1222 | dependencies = [ 1223 | "ahash 0.8.11", 1224 | ] 1225 | 1226 | [[package]] 1227 | name = "hashbrown" 1228 | version = "0.15.2" 1229 | source = "registry+https://github.com/rust-lang/crates.io-index" 1230 | checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" 1231 | 1232 | [[package]] 1233 | name = "hashlink" 1234 | version = "0.9.1" 1235 | source = "registry+https://github.com/rust-lang/crates.io-index" 1236 | checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" 1237 | dependencies = [ 1238 | "hashbrown 0.14.5", 1239 | ] 1240 | 1241 | [[package]] 1242 | name = "heck" 1243 | version = "0.4.1" 1244 | source = "registry+https://github.com/rust-lang/crates.io-index" 1245 | checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" 1246 | 1247 | [[package]] 1248 | name = "heck" 1249 | version = "0.5.0" 1250 | source = "registry+https://github.com/rust-lang/crates.io-index" 1251 | checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" 1252 | 1253 | [[package]] 1254 | name = "hex" 1255 | version = "0.4.3" 1256 | source = "registry+https://github.com/rust-lang/crates.io-index" 1257 | checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" 1258 | 1259 | [[package]] 1260 | name = "hmac" 1261 | version = "0.12.1" 1262 | source = "registry+https://github.com/rust-lang/crates.io-index" 1263 | checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" 1264 | dependencies = [ 1265 | "digest", 1266 | ] 1267 | 1268 | [[package]] 1269 | name = "http" 1270 | version = "0.2.12" 1271 | source = "registry+https://github.com/rust-lang/crates.io-index" 1272 | checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" 1273 | dependencies = [ 1274 | "bytes", 1275 | "fnv", 1276 | "itoa", 1277 | ] 1278 | 1279 | [[package]] 1280 | name = "http-body" 1281 | version = "0.4.6" 1282 | source = "registry+https://github.com/rust-lang/crates.io-index" 1283 | checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" 1284 | dependencies = [ 1285 | "bytes", 1286 | "http", 1287 | "pin-project-lite", 1288 | ] 1289 | 1290 | [[package]] 1291 | name = "httparse" 1292 | version = "1.9.5" 1293 | source = "registry+https://github.com/rust-lang/crates.io-index" 1294 | checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" 1295 | 1296 | [[package]] 1297 | name = "httpdate" 1298 | version = "1.0.3" 1299 | source = "registry+https://github.com/rust-lang/crates.io-index" 1300 | checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" 1301 | 1302 | [[package]] 1303 | name = "hyper" 1304 | version = "0.14.32" 1305 | source = "registry+https://github.com/rust-lang/crates.io-index" 1306 | checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" 1307 | dependencies = [ 1308 | "bytes", 1309 | "futures-channel", 1310 | "futures-core", 1311 | "futures-util", 1312 | "h2", 1313 | "http", 1314 | "http-body", 1315 | "httparse", 1316 | "httpdate", 1317 | "itoa", 1318 | "pin-project-lite", 1319 | "socket2", 1320 | "tokio", 1321 | "tower-service", 1322 | "tracing", 1323 | "want", 1324 | ] 1325 | 1326 | [[package]] 1327 | name = "hyper-rustls" 1328 | version = "0.23.2" 1329 | source = "registry+https://github.com/rust-lang/crates.io-index" 1330 | checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" 1331 | dependencies = [ 1332 | "http", 1333 | "hyper", 1334 | "log", 1335 | "rustls", 1336 | "rustls-native-certs", 1337 | "tokio", 1338 | "tokio-rustls", 1339 | ] 1340 | 1341 | [[package]] 1342 | name = "iana-time-zone" 1343 | version = "0.1.61" 1344 | source = "registry+https://github.com/rust-lang/crates.io-index" 1345 | checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" 1346 | dependencies = [ 1347 | "android_system_properties", 1348 | "core-foundation-sys", 1349 | "iana-time-zone-haiku", 1350 | "js-sys", 1351 | "wasm-bindgen", 1352 | "windows-core", 1353 | ] 1354 | 1355 | [[package]] 1356 | name = "iana-time-zone-haiku" 1357 | version = "0.1.2" 1358 | source = "registry+https://github.com/rust-lang/crates.io-index" 1359 | checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" 1360 | dependencies = [ 1361 | "cc", 1362 | ] 1363 | 1364 | [[package]] 1365 | name = "indexmap" 1366 | version = "2.7.0" 1367 | source = "registry+https://github.com/rust-lang/crates.io-index" 1368 | checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" 1369 | dependencies = [ 1370 | "equivalent", 1371 | "hashbrown 0.15.2", 1372 | ] 1373 | 1374 | [[package]] 1375 | name = "instant" 1376 | version = "0.1.13" 1377 | source = "registry+https://github.com/rust-lang/crates.io-index" 1378 | checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" 1379 | dependencies = [ 1380 | "cfg-if", 1381 | ] 1382 | 1383 | [[package]] 1384 | name = "itertools" 1385 | version = "0.13.0" 1386 | source = "registry+https://github.com/rust-lang/crates.io-index" 1387 | checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" 1388 | dependencies = [ 1389 | "either", 1390 | ] 1391 | 1392 | [[package]] 1393 | name = "itoa" 1394 | version = "1.0.14" 1395 | source = "registry+https://github.com/rust-lang/crates.io-index" 1396 | checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" 1397 | 1398 | [[package]] 1399 | name = "jobserver" 1400 | version = "0.1.32" 1401 | source = "registry+https://github.com/rust-lang/crates.io-index" 1402 | checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" 1403 | dependencies = [ 1404 | "libc", 1405 | ] 1406 | 1407 | [[package]] 1408 | name = "js-sys" 1409 | version = "0.3.76" 1410 | source = "registry+https://github.com/rust-lang/crates.io-index" 1411 | checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7" 1412 | dependencies = [ 1413 | "once_cell", 1414 | "wasm-bindgen", 1415 | ] 1416 | 1417 | [[package]] 1418 | name = "lazy_static" 1419 | version = "1.5.0" 1420 | source = "registry+https://github.com/rust-lang/crates.io-index" 1421 | checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" 1422 | 1423 | [[package]] 1424 | name = "lexical-core" 1425 | version = "1.0.5" 1426 | source = "registry+https://github.com/rust-lang/crates.io-index" 1427 | checksum = "b765c31809609075565a70b4b71402281283aeda7ecaf4818ac14a7b2ade8958" 1428 | dependencies = [ 1429 | "lexical-parse-float", 1430 | "lexical-parse-integer", 1431 | "lexical-util", 1432 | "lexical-write-float", 1433 | "lexical-write-integer", 1434 | ] 1435 | 1436 | [[package]] 1437 | name = "lexical-parse-float" 1438 | version = "1.0.5" 1439 | source = "registry+https://github.com/rust-lang/crates.io-index" 1440 | checksum = "de6f9cb01fb0b08060209a057c048fcbab8717b4c1ecd2eac66ebfe39a65b0f2" 1441 | dependencies = [ 1442 | "lexical-parse-integer", 1443 | "lexical-util", 1444 | "static_assertions", 1445 | ] 1446 | 1447 | [[package]] 1448 | name = "lexical-parse-integer" 1449 | version = "1.0.5" 1450 | source = "registry+https://github.com/rust-lang/crates.io-index" 1451 | checksum = "72207aae22fc0a121ba7b6d479e42cbfea549af1479c3f3a4f12c70dd66df12e" 1452 | dependencies = [ 1453 | "lexical-util", 1454 | "static_assertions", 1455 | ] 1456 | 1457 | [[package]] 1458 | name = "lexical-util" 1459 | version = "1.0.6" 1460 | source = "registry+https://github.com/rust-lang/crates.io-index" 1461 | checksum = "5a82e24bf537fd24c177ffbbdc6ebcc8d54732c35b50a3f28cc3f4e4c949a0b3" 1462 | dependencies = [ 1463 | "static_assertions", 1464 | ] 1465 | 1466 | [[package]] 1467 | name = "lexical-write-float" 1468 | version = "1.0.5" 1469 | source = "registry+https://github.com/rust-lang/crates.io-index" 1470 | checksum = "c5afc668a27f460fb45a81a757b6bf2f43c2d7e30cb5a2dcd3abf294c78d62bd" 1471 | dependencies = [ 1472 | "lexical-util", 1473 | "lexical-write-integer", 1474 | "static_assertions", 1475 | ] 1476 | 1477 | [[package]] 1478 | name = "lexical-write-integer" 1479 | version = "1.0.5" 1480 | source = "registry+https://github.com/rust-lang/crates.io-index" 1481 | checksum = "629ddff1a914a836fb245616a7888b62903aae58fa771e1d83943035efa0f978" 1482 | dependencies = [ 1483 | "lexical-util", 1484 | "static_assertions", 1485 | ] 1486 | 1487 | [[package]] 1488 | name = "libc" 1489 | version = "0.2.169" 1490 | source = "registry+https://github.com/rust-lang/crates.io-index" 1491 | checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" 1492 | 1493 | [[package]] 1494 | name = "libduckdb-sys" 1495 | version = "1.1.1" 1496 | source = "registry+https://github.com/rust-lang/crates.io-index" 1497 | checksum = "eac2de5219db852597558df5dcd617ffccd5cbd7b9f5402ccbf899aca6cb6047" 1498 | dependencies = [ 1499 | "autocfg", 1500 | "cc", 1501 | "flate2", 1502 | "pkg-config", 1503 | "serde", 1504 | "serde_json", 1505 | "tar", 1506 | "vcpkg", 1507 | ] 1508 | 1509 | [[package]] 1510 | name = "libloading" 1511 | version = "0.8.6" 1512 | source = "registry+https://github.com/rust-lang/crates.io-index" 1513 | checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" 1514 | dependencies = [ 1515 | "cfg-if", 1516 | "windows-targets", 1517 | ] 1518 | 1519 | [[package]] 1520 | name = "libm" 1521 | version = "0.2.11" 1522 | source = "registry+https://github.com/rust-lang/crates.io-index" 1523 | checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" 1524 | 1525 | [[package]] 1526 | name = "libredox" 1527 | version = "0.1.3" 1528 | source = "registry+https://github.com/rust-lang/crates.io-index" 1529 | checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" 1530 | dependencies = [ 1531 | "bitflags", 1532 | "libc", 1533 | "redox_syscall", 1534 | ] 1535 | 1536 | [[package]] 1537 | name = "linux-raw-sys" 1538 | version = "0.4.14" 1539 | source = "registry+https://github.com/rust-lang/crates.io-index" 1540 | checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" 1541 | 1542 | [[package]] 1543 | name = "lock_api" 1544 | version = "0.4.12" 1545 | source = "registry+https://github.com/rust-lang/crates.io-index" 1546 | checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" 1547 | dependencies = [ 1548 | "autocfg", 1549 | "scopeguard", 1550 | ] 1551 | 1552 | [[package]] 1553 | name = "log" 1554 | version = "0.4.22" 1555 | source = "registry+https://github.com/rust-lang/crates.io-index" 1556 | checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" 1557 | 1558 | [[package]] 1559 | name = "memchr" 1560 | version = "2.7.4" 1561 | source = "registry+https://github.com/rust-lang/crates.io-index" 1562 | checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" 1563 | 1564 | [[package]] 1565 | name = "minimal-lexical" 1566 | version = "0.2.1" 1567 | source = "registry+https://github.com/rust-lang/crates.io-index" 1568 | checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" 1569 | 1570 | [[package]] 1571 | name = "miniz_oxide" 1572 | version = "0.8.2" 1573 | source = "registry+https://github.com/rust-lang/crates.io-index" 1574 | checksum = "4ffbe83022cedc1d264172192511ae958937694cd57ce297164951b8b3568394" 1575 | dependencies = [ 1576 | "adler2", 1577 | ] 1578 | 1579 | [[package]] 1580 | name = "mio" 1581 | version = "1.0.3" 1582 | source = "registry+https://github.com/rust-lang/crates.io-index" 1583 | checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" 1584 | dependencies = [ 1585 | "libc", 1586 | "wasi", 1587 | "windows-sys 0.52.0", 1588 | ] 1589 | 1590 | [[package]] 1591 | name = "nom" 1592 | version = "7.1.3" 1593 | source = "registry+https://github.com/rust-lang/crates.io-index" 1594 | checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" 1595 | dependencies = [ 1596 | "memchr", 1597 | "minimal-lexical", 1598 | ] 1599 | 1600 | [[package]] 1601 | name = "num" 1602 | version = "0.4.3" 1603 | source = "registry+https://github.com/rust-lang/crates.io-index" 1604 | checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" 1605 | dependencies = [ 1606 | "num-bigint", 1607 | "num-complex", 1608 | "num-integer", 1609 | "num-iter", 1610 | "num-rational", 1611 | "num-traits", 1612 | ] 1613 | 1614 | [[package]] 1615 | name = "num-bigint" 1616 | version = "0.4.6" 1617 | source = "registry+https://github.com/rust-lang/crates.io-index" 1618 | checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" 1619 | dependencies = [ 1620 | "num-integer", 1621 | "num-traits", 1622 | ] 1623 | 1624 | [[package]] 1625 | name = "num-complex" 1626 | version = "0.4.6" 1627 | source = "registry+https://github.com/rust-lang/crates.io-index" 1628 | checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" 1629 | dependencies = [ 1630 | "num-traits", 1631 | ] 1632 | 1633 | [[package]] 1634 | name = "num-conv" 1635 | version = "0.1.0" 1636 | source = "registry+https://github.com/rust-lang/crates.io-index" 1637 | checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" 1638 | 1639 | [[package]] 1640 | name = "num-integer" 1641 | version = "0.1.46" 1642 | source = "registry+https://github.com/rust-lang/crates.io-index" 1643 | checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" 1644 | dependencies = [ 1645 | "num-traits", 1646 | ] 1647 | 1648 | [[package]] 1649 | name = "num-iter" 1650 | version = "0.1.45" 1651 | source = "registry+https://github.com/rust-lang/crates.io-index" 1652 | checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" 1653 | dependencies = [ 1654 | "autocfg", 1655 | "num-integer", 1656 | "num-traits", 1657 | ] 1658 | 1659 | [[package]] 1660 | name = "num-rational" 1661 | version = "0.4.2" 1662 | source = "registry+https://github.com/rust-lang/crates.io-index" 1663 | checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" 1664 | dependencies = [ 1665 | "num-bigint", 1666 | "num-integer", 1667 | "num-traits", 1668 | ] 1669 | 1670 | [[package]] 1671 | name = "num-traits" 1672 | version = "0.2.19" 1673 | source = "registry+https://github.com/rust-lang/crates.io-index" 1674 | checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" 1675 | dependencies = [ 1676 | "autocfg", 1677 | "libm", 1678 | ] 1679 | 1680 | [[package]] 1681 | name = "object" 1682 | version = "0.36.5" 1683 | source = "registry+https://github.com/rust-lang/crates.io-index" 1684 | checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" 1685 | dependencies = [ 1686 | "memchr", 1687 | ] 1688 | 1689 | [[package]] 1690 | name = "once_cell" 1691 | version = "1.20.2" 1692 | source = "registry+https://github.com/rust-lang/crates.io-index" 1693 | checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" 1694 | 1695 | [[package]] 1696 | name = "openssl-probe" 1697 | version = "0.1.5" 1698 | source = "registry+https://github.com/rust-lang/crates.io-index" 1699 | checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" 1700 | 1701 | [[package]] 1702 | name = "outref" 1703 | version = "0.5.1" 1704 | source = "registry+https://github.com/rust-lang/crates.io-index" 1705 | checksum = "4030760ffd992bef45b0ae3f10ce1aba99e33464c90d14dd7c039884963ddc7a" 1706 | 1707 | [[package]] 1708 | name = "parking_lot" 1709 | version = "0.12.3" 1710 | source = "registry+https://github.com/rust-lang/crates.io-index" 1711 | checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" 1712 | dependencies = [ 1713 | "lock_api", 1714 | "parking_lot_core", 1715 | ] 1716 | 1717 | [[package]] 1718 | name = "parking_lot_core" 1719 | version = "0.9.10" 1720 | source = "registry+https://github.com/rust-lang/crates.io-index" 1721 | checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" 1722 | dependencies = [ 1723 | "cfg-if", 1724 | "libc", 1725 | "redox_syscall", 1726 | "smallvec", 1727 | "windows-targets", 1728 | ] 1729 | 1730 | [[package]] 1731 | name = "percent-encoding" 1732 | version = "2.3.1" 1733 | source = "registry+https://github.com/rust-lang/crates.io-index" 1734 | checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" 1735 | 1736 | [[package]] 1737 | name = "pin-project" 1738 | version = "1.1.7" 1739 | source = "registry+https://github.com/rust-lang/crates.io-index" 1740 | checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95" 1741 | dependencies = [ 1742 | "pin-project-internal", 1743 | ] 1744 | 1745 | [[package]] 1746 | name = "pin-project-internal" 1747 | version = "1.1.7" 1748 | source = "registry+https://github.com/rust-lang/crates.io-index" 1749 | checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" 1750 | dependencies = [ 1751 | "proc-macro2", 1752 | "quote", 1753 | "syn 2.0.90", 1754 | ] 1755 | 1756 | [[package]] 1757 | name = "pin-project-lite" 1758 | version = "0.2.15" 1759 | source = "registry+https://github.com/rust-lang/crates.io-index" 1760 | checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" 1761 | 1762 | [[package]] 1763 | name = "pin-utils" 1764 | version = "0.1.0" 1765 | source = "registry+https://github.com/rust-lang/crates.io-index" 1766 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 1767 | 1768 | [[package]] 1769 | name = "pkg-config" 1770 | version = "0.3.31" 1771 | source = "registry+https://github.com/rust-lang/crates.io-index" 1772 | checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" 1773 | 1774 | [[package]] 1775 | name = "powerfmt" 1776 | version = "0.2.0" 1777 | source = "registry+https://github.com/rust-lang/crates.io-index" 1778 | checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" 1779 | 1780 | [[package]] 1781 | name = "ppv-lite86" 1782 | version = "0.2.20" 1783 | source = "registry+https://github.com/rust-lang/crates.io-index" 1784 | checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" 1785 | dependencies = [ 1786 | "zerocopy", 1787 | ] 1788 | 1789 | [[package]] 1790 | name = "prettyplease" 1791 | version = "0.2.25" 1792 | source = "registry+https://github.com/rust-lang/crates.io-index" 1793 | checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" 1794 | dependencies = [ 1795 | "proc-macro2", 1796 | "syn 2.0.90", 1797 | ] 1798 | 1799 | [[package]] 1800 | name = "proc-macro-crate" 1801 | version = "3.2.0" 1802 | source = "registry+https://github.com/rust-lang/crates.io-index" 1803 | checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" 1804 | dependencies = [ 1805 | "toml_edit", 1806 | ] 1807 | 1808 | [[package]] 1809 | name = "proc-macro2" 1810 | version = "1.0.92" 1811 | source = "registry+https://github.com/rust-lang/crates.io-index" 1812 | checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" 1813 | dependencies = [ 1814 | "unicode-ident", 1815 | ] 1816 | 1817 | [[package]] 1818 | name = "ptr_meta" 1819 | version = "0.1.4" 1820 | source = "registry+https://github.com/rust-lang/crates.io-index" 1821 | checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" 1822 | dependencies = [ 1823 | "ptr_meta_derive", 1824 | ] 1825 | 1826 | [[package]] 1827 | name = "ptr_meta_derive" 1828 | version = "0.1.4" 1829 | source = "registry+https://github.com/rust-lang/crates.io-index" 1830 | checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" 1831 | dependencies = [ 1832 | "proc-macro2", 1833 | "quote", 1834 | "syn 1.0.109", 1835 | ] 1836 | 1837 | [[package]] 1838 | name = "quote" 1839 | version = "1.0.37" 1840 | source = "registry+https://github.com/rust-lang/crates.io-index" 1841 | checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" 1842 | dependencies = [ 1843 | "proc-macro2", 1844 | ] 1845 | 1846 | [[package]] 1847 | name = "radium" 1848 | version = "0.7.0" 1849 | source = "registry+https://github.com/rust-lang/crates.io-index" 1850 | checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" 1851 | 1852 | [[package]] 1853 | name = "rand" 1854 | version = "0.8.5" 1855 | source = "registry+https://github.com/rust-lang/crates.io-index" 1856 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 1857 | dependencies = [ 1858 | "libc", 1859 | "rand_chacha", 1860 | "rand_core", 1861 | ] 1862 | 1863 | [[package]] 1864 | name = "rand_chacha" 1865 | version = "0.3.1" 1866 | source = "registry+https://github.com/rust-lang/crates.io-index" 1867 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 1868 | dependencies = [ 1869 | "ppv-lite86", 1870 | "rand_core", 1871 | ] 1872 | 1873 | [[package]] 1874 | name = "rand_core" 1875 | version = "0.6.4" 1876 | source = "registry+https://github.com/rust-lang/crates.io-index" 1877 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 1878 | dependencies = [ 1879 | "getrandom", 1880 | ] 1881 | 1882 | [[package]] 1883 | name = "redox_syscall" 1884 | version = "0.5.8" 1885 | source = "registry+https://github.com/rust-lang/crates.io-index" 1886 | checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" 1887 | dependencies = [ 1888 | "bitflags", 1889 | ] 1890 | 1891 | [[package]] 1892 | name = "regex" 1893 | version = "1.11.1" 1894 | source = "registry+https://github.com/rust-lang/crates.io-index" 1895 | checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" 1896 | dependencies = [ 1897 | "aho-corasick", 1898 | "memchr", 1899 | "regex-automata", 1900 | "regex-syntax", 1901 | ] 1902 | 1903 | [[package]] 1904 | name = "regex-automata" 1905 | version = "0.4.9" 1906 | source = "registry+https://github.com/rust-lang/crates.io-index" 1907 | checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" 1908 | dependencies = [ 1909 | "aho-corasick", 1910 | "memchr", 1911 | "regex-syntax", 1912 | ] 1913 | 1914 | [[package]] 1915 | name = "regex-syntax" 1916 | version = "0.8.5" 1917 | source = "registry+https://github.com/rust-lang/crates.io-index" 1918 | checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" 1919 | 1920 | [[package]] 1921 | name = "rend" 1922 | version = "0.4.2" 1923 | source = "registry+https://github.com/rust-lang/crates.io-index" 1924 | checksum = "71fe3824f5629716b1589be05dacd749f6aa084c87e00e016714a8cdfccc997c" 1925 | dependencies = [ 1926 | "bytecheck", 1927 | ] 1928 | 1929 | [[package]] 1930 | name = "ring" 1931 | version = "0.16.20" 1932 | source = "registry+https://github.com/rust-lang/crates.io-index" 1933 | checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" 1934 | dependencies = [ 1935 | "cc", 1936 | "libc", 1937 | "once_cell", 1938 | "spin 0.5.2", 1939 | "untrusted 0.7.1", 1940 | "web-sys", 1941 | "winapi", 1942 | ] 1943 | 1944 | [[package]] 1945 | name = "ring" 1946 | version = "0.17.8" 1947 | source = "registry+https://github.com/rust-lang/crates.io-index" 1948 | checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" 1949 | dependencies = [ 1950 | "cc", 1951 | "cfg-if", 1952 | "getrandom", 1953 | "libc", 1954 | "spin 0.9.8", 1955 | "untrusted 0.9.0", 1956 | "windows-sys 0.52.0", 1957 | ] 1958 | 1959 | [[package]] 1960 | name = "rkyv" 1961 | version = "0.7.45" 1962 | source = "registry+https://github.com/rust-lang/crates.io-index" 1963 | checksum = "9008cd6385b9e161d8229e1f6549dd23c3d022f132a2ea37ac3a10ac4935779b" 1964 | dependencies = [ 1965 | "bitvec", 1966 | "bytecheck", 1967 | "bytes", 1968 | "hashbrown 0.12.3", 1969 | "ptr_meta", 1970 | "rend", 1971 | "rkyv_derive", 1972 | "seahash", 1973 | "tinyvec", 1974 | "uuid", 1975 | ] 1976 | 1977 | [[package]] 1978 | name = "rkyv_derive" 1979 | version = "0.7.45" 1980 | source = "registry+https://github.com/rust-lang/crates.io-index" 1981 | checksum = "503d1d27590a2b0a3a4ca4c94755aa2875657196ecbf401a42eff41d7de532c0" 1982 | dependencies = [ 1983 | "proc-macro2", 1984 | "quote", 1985 | "syn 1.0.109", 1986 | ] 1987 | 1988 | [[package]] 1989 | name = "rust_decimal" 1990 | version = "1.36.0" 1991 | source = "registry+https://github.com/rust-lang/crates.io-index" 1992 | checksum = "b082d80e3e3cc52b2ed634388d436fe1f4de6af5786cc2de9ba9737527bdf555" 1993 | dependencies = [ 1994 | "arrayvec", 1995 | "borsh", 1996 | "bytes", 1997 | "num-traits", 1998 | "rand", 1999 | "rkyv", 2000 | "serde", 2001 | "serde_json", 2002 | ] 2003 | 2004 | [[package]] 2005 | name = "rustc-demangle" 2006 | version = "0.1.24" 2007 | source = "registry+https://github.com/rust-lang/crates.io-index" 2008 | checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" 2009 | 2010 | [[package]] 2011 | name = "rustc-hash" 2012 | version = "2.1.0" 2013 | source = "registry+https://github.com/rust-lang/crates.io-index" 2014 | checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497" 2015 | 2016 | [[package]] 2017 | name = "rustc_version" 2018 | version = "0.4.1" 2019 | source = "registry+https://github.com/rust-lang/crates.io-index" 2020 | checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" 2021 | dependencies = [ 2022 | "semver", 2023 | ] 2024 | 2025 | [[package]] 2026 | name = "rustix" 2027 | version = "0.38.42" 2028 | source = "registry+https://github.com/rust-lang/crates.io-index" 2029 | checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85" 2030 | dependencies = [ 2031 | "bitflags", 2032 | "errno", 2033 | "libc", 2034 | "linux-raw-sys", 2035 | "windows-sys 0.59.0", 2036 | ] 2037 | 2038 | [[package]] 2039 | name = "rustls" 2040 | version = "0.20.9" 2041 | source = "registry+https://github.com/rust-lang/crates.io-index" 2042 | checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" 2043 | dependencies = [ 2044 | "log", 2045 | "ring 0.16.20", 2046 | "sct", 2047 | "webpki", 2048 | ] 2049 | 2050 | [[package]] 2051 | name = "rustls-native-certs" 2052 | version = "0.6.3" 2053 | source = "registry+https://github.com/rust-lang/crates.io-index" 2054 | checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" 2055 | dependencies = [ 2056 | "openssl-probe", 2057 | "rustls-pemfile", 2058 | "schannel", 2059 | "security-framework", 2060 | ] 2061 | 2062 | [[package]] 2063 | name = "rustls-pemfile" 2064 | version = "1.0.4" 2065 | source = "registry+https://github.com/rust-lang/crates.io-index" 2066 | checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" 2067 | dependencies = [ 2068 | "base64 0.21.7", 2069 | ] 2070 | 2071 | [[package]] 2072 | name = "rustversion" 2073 | version = "1.0.18" 2074 | source = "registry+https://github.com/rust-lang/crates.io-index" 2075 | checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" 2076 | 2077 | [[package]] 2078 | name = "ryu" 2079 | version = "1.0.18" 2080 | source = "registry+https://github.com/rust-lang/crates.io-index" 2081 | checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" 2082 | 2083 | [[package]] 2084 | name = "schannel" 2085 | version = "0.1.27" 2086 | source = "registry+https://github.com/rust-lang/crates.io-index" 2087 | checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" 2088 | dependencies = [ 2089 | "windows-sys 0.59.0", 2090 | ] 2091 | 2092 | [[package]] 2093 | name = "scopeguard" 2094 | version = "1.2.0" 2095 | source = "registry+https://github.com/rust-lang/crates.io-index" 2096 | checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" 2097 | 2098 | [[package]] 2099 | name = "sct" 2100 | version = "0.7.1" 2101 | source = "registry+https://github.com/rust-lang/crates.io-index" 2102 | checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" 2103 | dependencies = [ 2104 | "ring 0.17.8", 2105 | "untrusted 0.9.0", 2106 | ] 2107 | 2108 | [[package]] 2109 | name = "seahash" 2110 | version = "4.1.0" 2111 | source = "registry+https://github.com/rust-lang/crates.io-index" 2112 | checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" 2113 | 2114 | [[package]] 2115 | name = "security-framework" 2116 | version = "2.11.1" 2117 | source = "registry+https://github.com/rust-lang/crates.io-index" 2118 | checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" 2119 | dependencies = [ 2120 | "bitflags", 2121 | "core-foundation", 2122 | "core-foundation-sys", 2123 | "libc", 2124 | "security-framework-sys", 2125 | ] 2126 | 2127 | [[package]] 2128 | name = "security-framework-sys" 2129 | version = "2.13.0" 2130 | source = "registry+https://github.com/rust-lang/crates.io-index" 2131 | checksum = "1863fd3768cd83c56a7f60faa4dc0d403f1b6df0a38c3c25f44b7894e45370d5" 2132 | dependencies = [ 2133 | "core-foundation-sys", 2134 | "libc", 2135 | ] 2136 | 2137 | [[package]] 2138 | name = "semver" 2139 | version = "1.0.24" 2140 | source = "registry+https://github.com/rust-lang/crates.io-index" 2141 | checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba" 2142 | 2143 | [[package]] 2144 | name = "serde" 2145 | version = "1.0.216" 2146 | source = "registry+https://github.com/rust-lang/crates.io-index" 2147 | checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e" 2148 | dependencies = [ 2149 | "serde_derive", 2150 | ] 2151 | 2152 | [[package]] 2153 | name = "serde_derive" 2154 | version = "1.0.216" 2155 | source = "registry+https://github.com/rust-lang/crates.io-index" 2156 | checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e" 2157 | dependencies = [ 2158 | "proc-macro2", 2159 | "quote", 2160 | "syn 2.0.90", 2161 | ] 2162 | 2163 | [[package]] 2164 | name = "serde_json" 2165 | version = "1.0.133" 2166 | source = "registry+https://github.com/rust-lang/crates.io-index" 2167 | checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" 2168 | dependencies = [ 2169 | "itoa", 2170 | "memchr", 2171 | "ryu", 2172 | "serde", 2173 | ] 2174 | 2175 | [[package]] 2176 | name = "sha2" 2177 | version = "0.10.8" 2178 | source = "registry+https://github.com/rust-lang/crates.io-index" 2179 | checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" 2180 | dependencies = [ 2181 | "cfg-if", 2182 | "cpufeatures", 2183 | "digest", 2184 | ] 2185 | 2186 | [[package]] 2187 | name = "shlex" 2188 | version = "1.3.0" 2189 | source = "registry+https://github.com/rust-lang/crates.io-index" 2190 | checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" 2191 | 2192 | [[package]] 2193 | name = "signal-hook-registry" 2194 | version = "1.4.2" 2195 | source = "registry+https://github.com/rust-lang/crates.io-index" 2196 | checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" 2197 | dependencies = [ 2198 | "libc", 2199 | ] 2200 | 2201 | [[package]] 2202 | name = "simdutf8" 2203 | version = "0.1.5" 2204 | source = "registry+https://github.com/rust-lang/crates.io-index" 2205 | checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" 2206 | 2207 | [[package]] 2208 | name = "slab" 2209 | version = "0.4.9" 2210 | source = "registry+https://github.com/rust-lang/crates.io-index" 2211 | checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" 2212 | dependencies = [ 2213 | "autocfg", 2214 | ] 2215 | 2216 | [[package]] 2217 | name = "smallvec" 2218 | version = "1.13.2" 2219 | source = "registry+https://github.com/rust-lang/crates.io-index" 2220 | checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" 2221 | 2222 | [[package]] 2223 | name = "socket2" 2224 | version = "0.5.8" 2225 | source = "registry+https://github.com/rust-lang/crates.io-index" 2226 | checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" 2227 | dependencies = [ 2228 | "libc", 2229 | "windows-sys 0.52.0", 2230 | ] 2231 | 2232 | [[package]] 2233 | name = "spin" 2234 | version = "0.5.2" 2235 | source = "registry+https://github.com/rust-lang/crates.io-index" 2236 | checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" 2237 | 2238 | [[package]] 2239 | name = "spin" 2240 | version = "0.9.8" 2241 | source = "registry+https://github.com/rust-lang/crates.io-index" 2242 | checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" 2243 | 2244 | [[package]] 2245 | name = "static_assertions" 2246 | version = "1.1.0" 2247 | source = "registry+https://github.com/rust-lang/crates.io-index" 2248 | checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" 2249 | 2250 | [[package]] 2251 | name = "strum" 2252 | version = "0.25.0" 2253 | source = "registry+https://github.com/rust-lang/crates.io-index" 2254 | checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" 2255 | dependencies = [ 2256 | "strum_macros 0.25.3", 2257 | ] 2258 | 2259 | [[package]] 2260 | name = "strum" 2261 | version = "0.26.3" 2262 | source = "registry+https://github.com/rust-lang/crates.io-index" 2263 | checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" 2264 | 2265 | [[package]] 2266 | name = "strum_macros" 2267 | version = "0.25.3" 2268 | source = "registry+https://github.com/rust-lang/crates.io-index" 2269 | checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" 2270 | dependencies = [ 2271 | "heck 0.4.1", 2272 | "proc-macro2", 2273 | "quote", 2274 | "rustversion", 2275 | "syn 2.0.90", 2276 | ] 2277 | 2278 | [[package]] 2279 | name = "strum_macros" 2280 | version = "0.26.4" 2281 | source = "registry+https://github.com/rust-lang/crates.io-index" 2282 | checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" 2283 | dependencies = [ 2284 | "heck 0.5.0", 2285 | "proc-macro2", 2286 | "quote", 2287 | "rustversion", 2288 | "syn 2.0.90", 2289 | ] 2290 | 2291 | [[package]] 2292 | name = "subtle" 2293 | version = "2.6.1" 2294 | source = "registry+https://github.com/rust-lang/crates.io-index" 2295 | checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" 2296 | 2297 | [[package]] 2298 | name = "syn" 2299 | version = "1.0.109" 2300 | source = "registry+https://github.com/rust-lang/crates.io-index" 2301 | checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 2302 | dependencies = [ 2303 | "proc-macro2", 2304 | "quote", 2305 | "unicode-ident", 2306 | ] 2307 | 2308 | [[package]] 2309 | name = "syn" 2310 | version = "2.0.90" 2311 | source = "registry+https://github.com/rust-lang/crates.io-index" 2312 | checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" 2313 | dependencies = [ 2314 | "proc-macro2", 2315 | "quote", 2316 | "unicode-ident", 2317 | ] 2318 | 2319 | [[package]] 2320 | name = "tap" 2321 | version = "1.0.1" 2322 | source = "registry+https://github.com/rust-lang/crates.io-index" 2323 | checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" 2324 | 2325 | [[package]] 2326 | name = "tar" 2327 | version = "0.4.43" 2328 | source = "registry+https://github.com/rust-lang/crates.io-index" 2329 | checksum = "c65998313f8e17d0d553d28f91a0df93e4dbbbf770279c7bc21ca0f09ea1a1f6" 2330 | dependencies = [ 2331 | "filetime", 2332 | "libc", 2333 | "xattr", 2334 | ] 2335 | 2336 | [[package]] 2337 | name = "time" 2338 | version = "0.3.37" 2339 | source = "registry+https://github.com/rust-lang/crates.io-index" 2340 | checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" 2341 | dependencies = [ 2342 | "deranged", 2343 | "num-conv", 2344 | "powerfmt", 2345 | "serde", 2346 | "time-core", 2347 | "time-macros", 2348 | ] 2349 | 2350 | [[package]] 2351 | name = "time-core" 2352 | version = "0.1.2" 2353 | source = "registry+https://github.com/rust-lang/crates.io-index" 2354 | checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" 2355 | 2356 | [[package]] 2357 | name = "time-macros" 2358 | version = "0.2.19" 2359 | source = "registry+https://github.com/rust-lang/crates.io-index" 2360 | checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de" 2361 | dependencies = [ 2362 | "num-conv", 2363 | "time-core", 2364 | ] 2365 | 2366 | [[package]] 2367 | name = "tiny-keccak" 2368 | version = "2.0.2" 2369 | source = "registry+https://github.com/rust-lang/crates.io-index" 2370 | checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" 2371 | dependencies = [ 2372 | "crunchy", 2373 | ] 2374 | 2375 | [[package]] 2376 | name = "tinyvec" 2377 | version = "1.8.0" 2378 | source = "registry+https://github.com/rust-lang/crates.io-index" 2379 | checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" 2380 | dependencies = [ 2381 | "tinyvec_macros", 2382 | ] 2383 | 2384 | [[package]] 2385 | name = "tinyvec_macros" 2386 | version = "0.1.1" 2387 | source = "registry+https://github.com/rust-lang/crates.io-index" 2388 | checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 2389 | 2390 | [[package]] 2391 | name = "tokio" 2392 | version = "1.42.0" 2393 | source = "registry+https://github.com/rust-lang/crates.io-index" 2394 | checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551" 2395 | dependencies = [ 2396 | "backtrace", 2397 | "bytes", 2398 | "libc", 2399 | "mio", 2400 | "parking_lot", 2401 | "pin-project-lite", 2402 | "signal-hook-registry", 2403 | "socket2", 2404 | "tokio-macros", 2405 | "windows-sys 0.52.0", 2406 | ] 2407 | 2408 | [[package]] 2409 | name = "tokio-macros" 2410 | version = "2.4.0" 2411 | source = "registry+https://github.com/rust-lang/crates.io-index" 2412 | checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" 2413 | dependencies = [ 2414 | "proc-macro2", 2415 | "quote", 2416 | "syn 2.0.90", 2417 | ] 2418 | 2419 | [[package]] 2420 | name = "tokio-rustls" 2421 | version = "0.23.4" 2422 | source = "registry+https://github.com/rust-lang/crates.io-index" 2423 | checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" 2424 | dependencies = [ 2425 | "rustls", 2426 | "tokio", 2427 | "webpki", 2428 | ] 2429 | 2430 | [[package]] 2431 | name = "tokio-stream" 2432 | version = "0.1.17" 2433 | source = "registry+https://github.com/rust-lang/crates.io-index" 2434 | checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" 2435 | dependencies = [ 2436 | "futures-core", 2437 | "pin-project-lite", 2438 | "tokio", 2439 | ] 2440 | 2441 | [[package]] 2442 | name = "tokio-util" 2443 | version = "0.7.13" 2444 | source = "registry+https://github.com/rust-lang/crates.io-index" 2445 | checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078" 2446 | dependencies = [ 2447 | "bytes", 2448 | "futures-core", 2449 | "futures-sink", 2450 | "pin-project-lite", 2451 | "tokio", 2452 | ] 2453 | 2454 | [[package]] 2455 | name = "toml_datetime" 2456 | version = "0.6.8" 2457 | source = "registry+https://github.com/rust-lang/crates.io-index" 2458 | checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" 2459 | 2460 | [[package]] 2461 | name = "toml_edit" 2462 | version = "0.22.22" 2463 | source = "registry+https://github.com/rust-lang/crates.io-index" 2464 | checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" 2465 | dependencies = [ 2466 | "indexmap", 2467 | "toml_datetime", 2468 | "winnow", 2469 | ] 2470 | 2471 | [[package]] 2472 | name = "tower" 2473 | version = "0.4.13" 2474 | source = "registry+https://github.com/rust-lang/crates.io-index" 2475 | checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" 2476 | dependencies = [ 2477 | "futures-core", 2478 | "futures-util", 2479 | "pin-project", 2480 | "pin-project-lite", 2481 | "tokio", 2482 | "tower-layer", 2483 | "tower-service", 2484 | "tracing", 2485 | ] 2486 | 2487 | [[package]] 2488 | name = "tower-layer" 2489 | version = "0.3.3" 2490 | source = "registry+https://github.com/rust-lang/crates.io-index" 2491 | checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" 2492 | 2493 | [[package]] 2494 | name = "tower-service" 2495 | version = "0.3.3" 2496 | source = "registry+https://github.com/rust-lang/crates.io-index" 2497 | checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" 2498 | 2499 | [[package]] 2500 | name = "tracing" 2501 | version = "0.1.41" 2502 | source = "registry+https://github.com/rust-lang/crates.io-index" 2503 | checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" 2504 | dependencies = [ 2505 | "log", 2506 | "pin-project-lite", 2507 | "tracing-attributes", 2508 | "tracing-core", 2509 | ] 2510 | 2511 | [[package]] 2512 | name = "tracing-attributes" 2513 | version = "0.1.28" 2514 | source = "registry+https://github.com/rust-lang/crates.io-index" 2515 | checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" 2516 | dependencies = [ 2517 | "proc-macro2", 2518 | "quote", 2519 | "syn 2.0.90", 2520 | ] 2521 | 2522 | [[package]] 2523 | name = "tracing-core" 2524 | version = "0.1.33" 2525 | source = "registry+https://github.com/rust-lang/crates.io-index" 2526 | checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" 2527 | dependencies = [ 2528 | "once_cell", 2529 | ] 2530 | 2531 | [[package]] 2532 | name = "try-lock" 2533 | version = "0.2.5" 2534 | source = "registry+https://github.com/rust-lang/crates.io-index" 2535 | checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" 2536 | 2537 | [[package]] 2538 | name = "typenum" 2539 | version = "1.17.0" 2540 | source = "registry+https://github.com/rust-lang/crates.io-index" 2541 | checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" 2542 | 2543 | [[package]] 2544 | name = "unicode-ident" 2545 | version = "1.0.14" 2546 | source = "registry+https://github.com/rust-lang/crates.io-index" 2547 | checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" 2548 | 2549 | [[package]] 2550 | name = "unicode-width" 2551 | version = "0.2.0" 2552 | source = "registry+https://github.com/rust-lang/crates.io-index" 2553 | checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" 2554 | 2555 | [[package]] 2556 | name = "untrusted" 2557 | version = "0.7.1" 2558 | source = "registry+https://github.com/rust-lang/crates.io-index" 2559 | checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" 2560 | 2561 | [[package]] 2562 | name = "untrusted" 2563 | version = "0.9.0" 2564 | source = "registry+https://github.com/rust-lang/crates.io-index" 2565 | checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" 2566 | 2567 | [[package]] 2568 | name = "urlencoding" 2569 | version = "2.1.3" 2570 | source = "registry+https://github.com/rust-lang/crates.io-index" 2571 | checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" 2572 | 2573 | [[package]] 2574 | name = "uuid" 2575 | version = "1.11.0" 2576 | source = "registry+https://github.com/rust-lang/crates.io-index" 2577 | checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" 2578 | 2579 | [[package]] 2580 | name = "vcpkg" 2581 | version = "0.2.15" 2582 | source = "registry+https://github.com/rust-lang/crates.io-index" 2583 | checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 2584 | 2585 | [[package]] 2586 | name = "version_check" 2587 | version = "0.9.5" 2588 | source = "registry+https://github.com/rust-lang/crates.io-index" 2589 | checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" 2590 | 2591 | [[package]] 2592 | name = "vsimd" 2593 | version = "0.8.0" 2594 | source = "registry+https://github.com/rust-lang/crates.io-index" 2595 | checksum = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64" 2596 | 2597 | [[package]] 2598 | name = "want" 2599 | version = "0.3.1" 2600 | source = "registry+https://github.com/rust-lang/crates.io-index" 2601 | checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" 2602 | dependencies = [ 2603 | "try-lock", 2604 | ] 2605 | 2606 | [[package]] 2607 | name = "wasi" 2608 | version = "0.11.0+wasi-snapshot-preview1" 2609 | source = "registry+https://github.com/rust-lang/crates.io-index" 2610 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 2611 | 2612 | [[package]] 2613 | name = "wasm-bindgen" 2614 | version = "0.2.99" 2615 | source = "registry+https://github.com/rust-lang/crates.io-index" 2616 | checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396" 2617 | dependencies = [ 2618 | "cfg-if", 2619 | "once_cell", 2620 | "wasm-bindgen-macro", 2621 | ] 2622 | 2623 | [[package]] 2624 | name = "wasm-bindgen-backend" 2625 | version = "0.2.99" 2626 | source = "registry+https://github.com/rust-lang/crates.io-index" 2627 | checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79" 2628 | dependencies = [ 2629 | "bumpalo", 2630 | "log", 2631 | "proc-macro2", 2632 | "quote", 2633 | "syn 2.0.90", 2634 | "wasm-bindgen-shared", 2635 | ] 2636 | 2637 | [[package]] 2638 | name = "wasm-bindgen-macro" 2639 | version = "0.2.99" 2640 | source = "registry+https://github.com/rust-lang/crates.io-index" 2641 | checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe" 2642 | dependencies = [ 2643 | "quote", 2644 | "wasm-bindgen-macro-support", 2645 | ] 2646 | 2647 | [[package]] 2648 | name = "wasm-bindgen-macro-support" 2649 | version = "0.2.99" 2650 | source = "registry+https://github.com/rust-lang/crates.io-index" 2651 | checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" 2652 | dependencies = [ 2653 | "proc-macro2", 2654 | "quote", 2655 | "syn 2.0.90", 2656 | "wasm-bindgen-backend", 2657 | "wasm-bindgen-shared", 2658 | ] 2659 | 2660 | [[package]] 2661 | name = "wasm-bindgen-shared" 2662 | version = "0.2.99" 2663 | source = "registry+https://github.com/rust-lang/crates.io-index" 2664 | checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" 2665 | 2666 | [[package]] 2667 | name = "web-sys" 2668 | version = "0.3.76" 2669 | source = "registry+https://github.com/rust-lang/crates.io-index" 2670 | checksum = "04dd7223427d52553d3702c004d3b2fe07c148165faa56313cb00211e31c12bc" 2671 | dependencies = [ 2672 | "js-sys", 2673 | "wasm-bindgen", 2674 | ] 2675 | 2676 | [[package]] 2677 | name = "webpki" 2678 | version = "0.22.4" 2679 | source = "registry+https://github.com/rust-lang/crates.io-index" 2680 | checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" 2681 | dependencies = [ 2682 | "ring 0.17.8", 2683 | "untrusted 0.9.0", 2684 | ] 2685 | 2686 | [[package]] 2687 | name = "winapi" 2688 | version = "0.3.9" 2689 | source = "registry+https://github.com/rust-lang/crates.io-index" 2690 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 2691 | dependencies = [ 2692 | "winapi-i686-pc-windows-gnu", 2693 | "winapi-x86_64-pc-windows-gnu", 2694 | ] 2695 | 2696 | [[package]] 2697 | name = "winapi-i686-pc-windows-gnu" 2698 | version = "0.4.0" 2699 | source = "registry+https://github.com/rust-lang/crates.io-index" 2700 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 2701 | 2702 | [[package]] 2703 | name = "winapi-x86_64-pc-windows-gnu" 2704 | version = "0.4.0" 2705 | source = "registry+https://github.com/rust-lang/crates.io-index" 2706 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 2707 | 2708 | [[package]] 2709 | name = "windows-core" 2710 | version = "0.52.0" 2711 | source = "registry+https://github.com/rust-lang/crates.io-index" 2712 | checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" 2713 | dependencies = [ 2714 | "windows-targets", 2715 | ] 2716 | 2717 | [[package]] 2718 | name = "windows-sys" 2719 | version = "0.52.0" 2720 | source = "registry+https://github.com/rust-lang/crates.io-index" 2721 | checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" 2722 | dependencies = [ 2723 | "windows-targets", 2724 | ] 2725 | 2726 | [[package]] 2727 | name = "windows-sys" 2728 | version = "0.59.0" 2729 | source = "registry+https://github.com/rust-lang/crates.io-index" 2730 | checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" 2731 | dependencies = [ 2732 | "windows-targets", 2733 | ] 2734 | 2735 | [[package]] 2736 | name = "windows-targets" 2737 | version = "0.52.6" 2738 | source = "registry+https://github.com/rust-lang/crates.io-index" 2739 | checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" 2740 | dependencies = [ 2741 | "windows_aarch64_gnullvm", 2742 | "windows_aarch64_msvc", 2743 | "windows_i686_gnu", 2744 | "windows_i686_gnullvm", 2745 | "windows_i686_msvc", 2746 | "windows_x86_64_gnu", 2747 | "windows_x86_64_gnullvm", 2748 | "windows_x86_64_msvc", 2749 | ] 2750 | 2751 | [[package]] 2752 | name = "windows_aarch64_gnullvm" 2753 | version = "0.52.6" 2754 | source = "registry+https://github.com/rust-lang/crates.io-index" 2755 | checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" 2756 | 2757 | [[package]] 2758 | name = "windows_aarch64_msvc" 2759 | version = "0.52.6" 2760 | source = "registry+https://github.com/rust-lang/crates.io-index" 2761 | checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" 2762 | 2763 | [[package]] 2764 | name = "windows_i686_gnu" 2765 | version = "0.52.6" 2766 | source = "registry+https://github.com/rust-lang/crates.io-index" 2767 | checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" 2768 | 2769 | [[package]] 2770 | name = "windows_i686_gnullvm" 2771 | version = "0.52.6" 2772 | source = "registry+https://github.com/rust-lang/crates.io-index" 2773 | checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" 2774 | 2775 | [[package]] 2776 | name = "windows_i686_msvc" 2777 | version = "0.52.6" 2778 | source = "registry+https://github.com/rust-lang/crates.io-index" 2779 | checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" 2780 | 2781 | [[package]] 2782 | name = "windows_x86_64_gnu" 2783 | version = "0.52.6" 2784 | source = "registry+https://github.com/rust-lang/crates.io-index" 2785 | checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" 2786 | 2787 | [[package]] 2788 | name = "windows_x86_64_gnullvm" 2789 | version = "0.52.6" 2790 | source = "registry+https://github.com/rust-lang/crates.io-index" 2791 | checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" 2792 | 2793 | [[package]] 2794 | name = "windows_x86_64_msvc" 2795 | version = "0.52.6" 2796 | source = "registry+https://github.com/rust-lang/crates.io-index" 2797 | checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" 2798 | 2799 | [[package]] 2800 | name = "winnow" 2801 | version = "0.6.20" 2802 | source = "registry+https://github.com/rust-lang/crates.io-index" 2803 | checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" 2804 | dependencies = [ 2805 | "memchr", 2806 | ] 2807 | 2808 | [[package]] 2809 | name = "wyz" 2810 | version = "0.5.1" 2811 | source = "registry+https://github.com/rust-lang/crates.io-index" 2812 | checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" 2813 | dependencies = [ 2814 | "tap", 2815 | ] 2816 | 2817 | [[package]] 2818 | name = "xattr" 2819 | version = "1.3.1" 2820 | source = "registry+https://github.com/rust-lang/crates.io-index" 2821 | checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" 2822 | dependencies = [ 2823 | "libc", 2824 | "linux-raw-sys", 2825 | "rustix", 2826 | ] 2827 | 2828 | [[package]] 2829 | name = "xmlparser" 2830 | version = "0.13.6" 2831 | source = "registry+https://github.com/rust-lang/crates.io-index" 2832 | checksum = "66fee0b777b0f5ac1c69bb06d361268faafa61cd4682ae064a171c16c433e9e4" 2833 | 2834 | [[package]] 2835 | name = "zerocopy" 2836 | version = "0.7.35" 2837 | source = "registry+https://github.com/rust-lang/crates.io-index" 2838 | checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" 2839 | dependencies = [ 2840 | "byteorder", 2841 | "zerocopy-derive", 2842 | ] 2843 | 2844 | [[package]] 2845 | name = "zerocopy-derive" 2846 | version = "0.7.35" 2847 | source = "registry+https://github.com/rust-lang/crates.io-index" 2848 | checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" 2849 | dependencies = [ 2850 | "proc-macro2", 2851 | "quote", 2852 | "syn 2.0.90", 2853 | ] 2854 | 2855 | [[package]] 2856 | name = "zeroize" 2857 | version = "1.8.1" 2858 | source = "registry+https://github.com/rust-lang/crates.io-index" 2859 | checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" 2860 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "duckdb-athena" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | duckdb_athena_rust = { path = "./duckdb_athena_rust" } 10 | tokio = { version = "1.23.0", features=['full'] } 11 | aws-config = "0.54.1" 12 | aws-sdk-athena = "0.24.0" 13 | aws-sdk-glue = "0.24.0" 14 | lazy_static = "1.4.0" 15 | anyhow = { version = "1.0.68", features = ["backtrace"] } 16 | futures = "0.3" 17 | 18 | [lib] 19 | name = "duckdb_athena" 20 | crate-type = ["staticlib"] 21 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:latest 2 | 3 | RUN apt-get update -y && \ 4 | apt-get install -y \ 5 | build-essential \ 6 | cmake \ 7 | curl \ 8 | git \ 9 | libclang-dev \ 10 | ninja-build 11 | RUN curl --proto '=https' --tlsv1.3 https://sh.rustup.rs -sSf | bash -s -- -y 12 | RUN echo 'source $HOME/.cargo/env' >> $HOME/.bashrc 13 | 14 | 15 | WORKDIR /app/duckdb-athena-extension 16 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Damon P. Cortesi 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | PROJ_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) 2 | 3 | # Configuration of extension 4 | EXT_NAME=athena 5 | EXT_CONFIG=${PROJ_DIR}extension_config.cmake 6 | 7 | # Include the Makefile from extension-ci-tools 8 | include extension-ci-tools/makefiles/duckdb_extension.Makefile 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DuckDB Athena Extension 2 | 3 | > **WARNING** This is a work in progress - things may or may not work as expected 🧙‍♂️ 4 | 5 | ## Limitations 6 | 7 | - Only the `default` database is supported 8 | - Not all data types are implemented yet 9 | - 10,000 results are returned by default (use `maxrows=-1` to return everything) 10 | - Pushdown predicates are not supported 11 | 12 | ## Getting started 13 | 14 | The Athena extension is supported in DuckDB v0.7.0 and up. To install the extension, start duckdb with the `unsigned` parameter. 15 | 16 | ``` 17 | > duckdb -unsigned 18 | v1.1.1 af39bd0dcf 19 | D 20 | ``` 21 | 22 | The first time you use the extension, you need to install it from a custom repository. 23 | 24 | ``` 25 | SET custom_extension_repository='d2j9pg7mqm9we6.cloudfront.net/athena/latest'; 26 | INSTALL athena; 27 | ``` 28 | 29 | Then LOAD the extension. You only need to run the INSTALL command once. 30 | 31 | ``` 32 | LOAD athena; 33 | ``` 34 | 35 | You can now extract data from tables in your default data catalog. 36 | 37 | ``` 38 | select * from athena_scan("noaa_gsod_pds", "s3://results-bucket/prefix"); 39 | ``` 40 | 41 | > **Warning** To prevent runaway queries, the extension only returns 10,000 rows by default. If you'd like to return everything, you can add `maxrows=-1` as a parameter inside the function. 42 | 43 | ``` 44 | select * from athena_scan("noaa_gsod_pds", "s3://results-bucket/prefix", maxrows=-1); 45 | ``` 46 | 47 | Filter pushdown is not yet supported so the extension will scan the entire table. 48 | 49 | > **Note** The extension uses your environment variables to figure out region and credentials. Make sure to have your access key/secret set. 50 | 51 | ## Development 52 | 53 | - Clone the repo with submodules 54 | 55 | ```bash 56 | git clone https://github.com/dacort/duckdb-athena-extension.git --recurse-submodules 57 | ``` 58 | 59 | - Build 60 | 61 | ```bash 62 | cd duckdb-athena-extension 63 | make 64 | ``` 65 | 66 | - Start up duckdb with the `-unsigned` parameter and your desired AWS_REGION 67 | 68 | ```bash 69 | AWS_REGION=us-east-1 build/debug/duckdb -unsigned 70 | ``` 71 | 72 | ```bash 73 | v1.1.1 af39bd0dcf 74 | Enter ".help" for usage hints. 75 | D 76 | ``` 77 | 78 | - Load the extension 79 | 80 | ``` 81 | load 'build/debug/extension/athena/athena.duckdb_extension'; 82 | ``` 83 | 84 | - Query a single table, also providing where S3 results are written to 85 | 86 | ```sql 87 | select * from athena_scan('table_name', 's3:///athena-results/'); 88 | ``` 89 | 90 | > **Warning**: 10,000 results will be returned by default! Use `maxrows=-1` to return the entire table. 91 | 92 | ``` 93 | D select * from athena_scan("amazon_reviews_parquet"); 94 | Running Athena query, execution id: 152a20c7-ff32-4a19-bb71-ae0135373ca6 95 | State: Queued, sleep 5 secs ... 96 | Total execution time: 1307 millis 97 | 100% ▕████████████████████████████████████████████████████████████▏ 98 | ┌─────────────┬─────────────┬────────────────┬────────────┬────────────────┬───┬─────────┬───────────────────┬──────────────────────┬──────────────────────┬─────────────────┬───────┐ 99 | │ marketplace │ customer_id │ review_id │ product_id │ product_parent │ … │ vine │ verified_purchase │ review_headline │ review_body │ review_date │ year │ 100 | │ varchar │ varchar │ varchar │ varchar │ varchar │ │ varchar │ varchar │ varchar │ varchar │ int64 │ int32 │ 101 | ├─────────────┼─────────────┼────────────────┼────────────┼────────────────┼───┼─────────┼───────────────────┼──────────────────────┼──────────────────────┼─────────────────┼───────┤ 102 | │ US │ 37441986 │ R2H287L0BUP89U │ B00CT780C2 │ 473048287 │ … │ N │ Y │ Perfect Gift │ I love giving my s… │ 140454171422720 │ 0 │ 103 | │ US │ 20676035 │ R1222MJHP5QWXE │ B004LLILFA │ 361255549 │ … │ N │ Y │ Five Stars │ Great gift for out… │ 16170 │ 2014 │ 104 | │ US │ 45090731 │ R32ECJRNTB61K8 │ B004LLIL4G │ 307223063 │ … │ N │ Y │ happy birthday card │ gift cards from Am… │ 140454171423232 │ 0 │ 105 | │ US │ 2207141 │ RLTEU3JZ1IJAA │ B004LLILDM │ 87389551 │ … │ N │ Y │ Five Stars │ gracias. │ 16391 │ 2014 │ 106 | │ US │ 15258 │ R1ZAX1TN66QOU6 │ B004LLIKVU │ 473048287 │ … │ N │ Y │ easy breezy │ gift card was sent… │ 140454171424000 │ 0 │ 107 | │ · │ · │ · │ · │ · │ · │ · │ · │ · │ · │ · │ · │ 108 | ├─────────────┴─────────────┴────────────────┴────────────┴────────────────┴───┴─────────┴───────────────────┴──────────────────────┴──────────────────────┴─────────────────┴───────┤ 109 | │ 999 rows (40 shown) 15 columns (11 shown) │ 110 | └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ 111 | ``` 112 | 113 | ## Credits 114 | 115 | - Initial rust DuckDB Extension Framework: https://github.com/Mause/duckdb_extension-framework 116 | - Updated rust extension framework: https://github.com/eto-ai/lance/tree/main/integration/duckdb_lance 117 | -------------------------------------------------------------------------------- /duckdb_athena_rust/.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | -------------------------------------------------------------------------------- /duckdb_athena_rust/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 4 4 | 5 | [[package]] 6 | name = "adler2" 7 | version = "2.0.0" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" 10 | 11 | [[package]] 12 | name = "ahash" 13 | version = "0.7.8" 14 | source = "registry+https://github.com/rust-lang/crates.io-index" 15 | checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" 16 | dependencies = [ 17 | "getrandom", 18 | "once_cell", 19 | "version_check", 20 | ] 21 | 22 | [[package]] 23 | name = "ahash" 24 | version = "0.8.11" 25 | source = "registry+https://github.com/rust-lang/crates.io-index" 26 | checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" 27 | dependencies = [ 28 | "cfg-if", 29 | "const-random", 30 | "getrandom", 31 | "once_cell", 32 | "version_check", 33 | "zerocopy", 34 | ] 35 | 36 | [[package]] 37 | name = "aho-corasick" 38 | version = "1.1.3" 39 | source = "registry+https://github.com/rust-lang/crates.io-index" 40 | checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" 41 | dependencies = [ 42 | "memchr", 43 | ] 44 | 45 | [[package]] 46 | name = "android-tzdata" 47 | version = "0.1.1" 48 | source = "registry+https://github.com/rust-lang/crates.io-index" 49 | checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" 50 | 51 | [[package]] 52 | name = "android_system_properties" 53 | version = "0.1.5" 54 | source = "registry+https://github.com/rust-lang/crates.io-index" 55 | checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 56 | dependencies = [ 57 | "libc", 58 | ] 59 | 60 | [[package]] 61 | name = "arrayvec" 62 | version = "0.7.6" 63 | source = "registry+https://github.com/rust-lang/crates.io-index" 64 | checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" 65 | 66 | [[package]] 67 | name = "arrow" 68 | version = "53.3.0" 69 | source = "registry+https://github.com/rust-lang/crates.io-index" 70 | checksum = "c91839b07e474b3995035fd8ac33ee54f9c9ccbbb1ea33d9909c71bffdf1259d" 71 | dependencies = [ 72 | "arrow-arith", 73 | "arrow-array", 74 | "arrow-buffer", 75 | "arrow-cast", 76 | "arrow-data", 77 | "arrow-ord", 78 | "arrow-row", 79 | "arrow-schema", 80 | "arrow-select", 81 | "arrow-string", 82 | ] 83 | 84 | [[package]] 85 | name = "arrow-arith" 86 | version = "53.3.0" 87 | source = "registry+https://github.com/rust-lang/crates.io-index" 88 | checksum = "855c57c4efd26722b044dcd3e348252560e3e0333087fb9f6479dc0bf744054f" 89 | dependencies = [ 90 | "arrow-array", 91 | "arrow-buffer", 92 | "arrow-data", 93 | "arrow-schema", 94 | "chrono", 95 | "half", 96 | "num", 97 | ] 98 | 99 | [[package]] 100 | name = "arrow-array" 101 | version = "53.3.0" 102 | source = "registry+https://github.com/rust-lang/crates.io-index" 103 | checksum = "bd03279cea46569acf9295f6224fbc370c5df184b4d2ecfe97ccb131d5615a7f" 104 | dependencies = [ 105 | "ahash 0.8.11", 106 | "arrow-buffer", 107 | "arrow-data", 108 | "arrow-schema", 109 | "chrono", 110 | "half", 111 | "hashbrown 0.15.2", 112 | "num", 113 | ] 114 | 115 | [[package]] 116 | name = "arrow-buffer" 117 | version = "53.3.0" 118 | source = "registry+https://github.com/rust-lang/crates.io-index" 119 | checksum = "9e4a9b9b1d6d7117f6138e13bc4dd5daa7f94e671b70e8c9c4dc37b4f5ecfc16" 120 | dependencies = [ 121 | "bytes", 122 | "half", 123 | "num", 124 | ] 125 | 126 | [[package]] 127 | name = "arrow-cast" 128 | version = "53.3.0" 129 | source = "registry+https://github.com/rust-lang/crates.io-index" 130 | checksum = "bc70e39916e60c5b7af7a8e2719e3ae589326039e1e863675a008bee5ffe90fd" 131 | dependencies = [ 132 | "arrow-array", 133 | "arrow-buffer", 134 | "arrow-data", 135 | "arrow-schema", 136 | "arrow-select", 137 | "atoi", 138 | "base64", 139 | "chrono", 140 | "comfy-table", 141 | "half", 142 | "lexical-core", 143 | "num", 144 | "ryu", 145 | ] 146 | 147 | [[package]] 148 | name = "arrow-data" 149 | version = "53.3.0" 150 | source = "registry+https://github.com/rust-lang/crates.io-index" 151 | checksum = "e4e75edf21ffd53744a9b8e3ed11101f610e7ceb1a29860432824f1834a1f623" 152 | dependencies = [ 153 | "arrow-buffer", 154 | "arrow-schema", 155 | "half", 156 | "num", 157 | ] 158 | 159 | [[package]] 160 | name = "arrow-ord" 161 | version = "53.3.0" 162 | source = "registry+https://github.com/rust-lang/crates.io-index" 163 | checksum = "ece7b5bc1180e6d82d1a60e1688c199829e8842e38497563c3ab6ea813e527fd" 164 | dependencies = [ 165 | "arrow-array", 166 | "arrow-buffer", 167 | "arrow-data", 168 | "arrow-schema", 169 | "arrow-select", 170 | "half", 171 | "num", 172 | ] 173 | 174 | [[package]] 175 | name = "arrow-row" 176 | version = "53.3.0" 177 | source = "registry+https://github.com/rust-lang/crates.io-index" 178 | checksum = "745c114c8f0e8ce211c83389270de6fbe96a9088a7b32c2a041258a443fe83ff" 179 | dependencies = [ 180 | "ahash 0.8.11", 181 | "arrow-array", 182 | "arrow-buffer", 183 | "arrow-data", 184 | "arrow-schema", 185 | "half", 186 | ] 187 | 188 | [[package]] 189 | name = "arrow-schema" 190 | version = "53.3.0" 191 | source = "registry+https://github.com/rust-lang/crates.io-index" 192 | checksum = "b95513080e728e4cec37f1ff5af4f12c9688d47795d17cda80b6ec2cf74d4678" 193 | dependencies = [ 194 | "bitflags", 195 | ] 196 | 197 | [[package]] 198 | name = "arrow-select" 199 | version = "53.3.0" 200 | source = "registry+https://github.com/rust-lang/crates.io-index" 201 | checksum = "8e415279094ea70323c032c6e739c48ad8d80e78a09bef7117b8718ad5bf3722" 202 | dependencies = [ 203 | "ahash 0.8.11", 204 | "arrow-array", 205 | "arrow-buffer", 206 | "arrow-data", 207 | "arrow-schema", 208 | "num", 209 | ] 210 | 211 | [[package]] 212 | name = "arrow-string" 213 | version = "53.3.0" 214 | source = "registry+https://github.com/rust-lang/crates.io-index" 215 | checksum = "11d956cae7002eb8d83a27dbd34daaea1cf5b75852f0b84deb4d93a276e92bbf" 216 | dependencies = [ 217 | "arrow-array", 218 | "arrow-buffer", 219 | "arrow-data", 220 | "arrow-schema", 221 | "arrow-select", 222 | "memchr", 223 | "num", 224 | "regex", 225 | "regex-syntax", 226 | ] 227 | 228 | [[package]] 229 | name = "atoi" 230 | version = "2.0.0" 231 | source = "registry+https://github.com/rust-lang/crates.io-index" 232 | checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" 233 | dependencies = [ 234 | "num-traits", 235 | ] 236 | 237 | [[package]] 238 | name = "autocfg" 239 | version = "1.4.0" 240 | source = "registry+https://github.com/rust-lang/crates.io-index" 241 | checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" 242 | 243 | [[package]] 244 | name = "base64" 245 | version = "0.22.1" 246 | source = "registry+https://github.com/rust-lang/crates.io-index" 247 | checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" 248 | 249 | [[package]] 250 | name = "bindgen" 251 | version = "0.71.1" 252 | source = "registry+https://github.com/rust-lang/crates.io-index" 253 | checksum = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3" 254 | dependencies = [ 255 | "bitflags", 256 | "cexpr", 257 | "clang-sys", 258 | "itertools", 259 | "log", 260 | "prettyplease", 261 | "proc-macro2", 262 | "quote", 263 | "regex", 264 | "rustc-hash", 265 | "shlex", 266 | "syn 2.0.90", 267 | ] 268 | 269 | [[package]] 270 | name = "bitflags" 271 | version = "2.6.0" 272 | source = "registry+https://github.com/rust-lang/crates.io-index" 273 | checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" 274 | 275 | [[package]] 276 | name = "bitvec" 277 | version = "1.0.1" 278 | source = "registry+https://github.com/rust-lang/crates.io-index" 279 | checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" 280 | dependencies = [ 281 | "funty", 282 | "radium", 283 | "tap", 284 | "wyz", 285 | ] 286 | 287 | [[package]] 288 | name = "borsh" 289 | version = "1.5.3" 290 | source = "registry+https://github.com/rust-lang/crates.io-index" 291 | checksum = "2506947f73ad44e344215ccd6403ac2ae18cd8e046e581a441bf8d199f257f03" 292 | dependencies = [ 293 | "borsh-derive", 294 | "cfg_aliases", 295 | ] 296 | 297 | [[package]] 298 | name = "borsh-derive" 299 | version = "1.5.3" 300 | source = "registry+https://github.com/rust-lang/crates.io-index" 301 | checksum = "c2593a3b8b938bd68373196c9832f516be11fa487ef4ae745eb282e6a56a7244" 302 | dependencies = [ 303 | "once_cell", 304 | "proc-macro-crate", 305 | "proc-macro2", 306 | "quote", 307 | "syn 2.0.90", 308 | ] 309 | 310 | [[package]] 311 | name = "build_script" 312 | version = "0.2.0" 313 | source = "registry+https://github.com/rust-lang/crates.io-index" 314 | checksum = "163ca3c07a6939838dfa322e1e36cd434cc2b625dacb051b8e8b893bbbb8aa62" 315 | dependencies = [ 316 | "once_cell", 317 | ] 318 | 319 | [[package]] 320 | name = "bumpalo" 321 | version = "3.16.0" 322 | source = "registry+https://github.com/rust-lang/crates.io-index" 323 | checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" 324 | 325 | [[package]] 326 | name = "bytecheck" 327 | version = "0.6.12" 328 | source = "registry+https://github.com/rust-lang/crates.io-index" 329 | checksum = "23cdc57ce23ac53c931e88a43d06d070a6fd142f2617be5855eb75efc9beb1c2" 330 | dependencies = [ 331 | "bytecheck_derive", 332 | "ptr_meta", 333 | "simdutf8", 334 | ] 335 | 336 | [[package]] 337 | name = "bytecheck_derive" 338 | version = "0.6.12" 339 | source = "registry+https://github.com/rust-lang/crates.io-index" 340 | checksum = "3db406d29fbcd95542e92559bed4d8ad92636d1ca8b3b72ede10b4bcc010e659" 341 | dependencies = [ 342 | "proc-macro2", 343 | "quote", 344 | "syn 1.0.109", 345 | ] 346 | 347 | [[package]] 348 | name = "byteorder" 349 | version = "1.5.0" 350 | source = "registry+https://github.com/rust-lang/crates.io-index" 351 | checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" 352 | 353 | [[package]] 354 | name = "bytes" 355 | version = "1.9.0" 356 | source = "registry+https://github.com/rust-lang/crates.io-index" 357 | checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" 358 | 359 | [[package]] 360 | name = "cast" 361 | version = "0.3.0" 362 | source = "registry+https://github.com/rust-lang/crates.io-index" 363 | checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" 364 | 365 | [[package]] 366 | name = "cc" 367 | version = "1.2.5" 368 | source = "registry+https://github.com/rust-lang/crates.io-index" 369 | checksum = "c31a0499c1dc64f458ad13872de75c0eb7e3fdb0e67964610c914b034fc5956e" 370 | dependencies = [ 371 | "jobserver", 372 | "libc", 373 | "shlex", 374 | ] 375 | 376 | [[package]] 377 | name = "cexpr" 378 | version = "0.6.0" 379 | source = "registry+https://github.com/rust-lang/crates.io-index" 380 | checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" 381 | dependencies = [ 382 | "nom", 383 | ] 384 | 385 | [[package]] 386 | name = "cfg-if" 387 | version = "1.0.0" 388 | source = "registry+https://github.com/rust-lang/crates.io-index" 389 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 390 | 391 | [[package]] 392 | name = "cfg_aliases" 393 | version = "0.2.1" 394 | source = "registry+https://github.com/rust-lang/crates.io-index" 395 | checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" 396 | 397 | [[package]] 398 | name = "chrono" 399 | version = "0.4.39" 400 | source = "registry+https://github.com/rust-lang/crates.io-index" 401 | checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" 402 | dependencies = [ 403 | "android-tzdata", 404 | "iana-time-zone", 405 | "num-traits", 406 | "windows-targets", 407 | ] 408 | 409 | [[package]] 410 | name = "clang-sys" 411 | version = "1.8.1" 412 | source = "registry+https://github.com/rust-lang/crates.io-index" 413 | checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" 414 | dependencies = [ 415 | "glob", 416 | "libc", 417 | "libloading", 418 | ] 419 | 420 | [[package]] 421 | name = "comfy-table" 422 | version = "7.1.3" 423 | source = "registry+https://github.com/rust-lang/crates.io-index" 424 | checksum = "24f165e7b643266ea80cb858aed492ad9280e3e05ce24d4a99d7d7b889b6a4d9" 425 | dependencies = [ 426 | "strum 0.26.3", 427 | "strum_macros 0.26.4", 428 | "unicode-width", 429 | ] 430 | 431 | [[package]] 432 | name = "const-random" 433 | version = "0.1.18" 434 | source = "registry+https://github.com/rust-lang/crates.io-index" 435 | checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359" 436 | dependencies = [ 437 | "const-random-macro", 438 | ] 439 | 440 | [[package]] 441 | name = "const-random-macro" 442 | version = "0.1.16" 443 | source = "registry+https://github.com/rust-lang/crates.io-index" 444 | checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" 445 | dependencies = [ 446 | "getrandom", 447 | "once_cell", 448 | "tiny-keccak", 449 | ] 450 | 451 | [[package]] 452 | name = "core-foundation-sys" 453 | version = "0.8.7" 454 | source = "registry+https://github.com/rust-lang/crates.io-index" 455 | checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" 456 | 457 | [[package]] 458 | name = "crc32fast" 459 | version = "1.4.2" 460 | source = "registry+https://github.com/rust-lang/crates.io-index" 461 | checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" 462 | dependencies = [ 463 | "cfg-if", 464 | ] 465 | 466 | [[package]] 467 | name = "crunchy" 468 | version = "0.2.2" 469 | source = "registry+https://github.com/rust-lang/crates.io-index" 470 | checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" 471 | 472 | [[package]] 473 | name = "duckdb" 474 | version = "1.1.1" 475 | source = "registry+https://github.com/rust-lang/crates.io-index" 476 | checksum = "86844939330ba6ce345c4b5333d3be45c4f0c092779bf9617bba92efb8b841f5" 477 | dependencies = [ 478 | "arrow", 479 | "cast", 480 | "fallible-iterator", 481 | "fallible-streaming-iterator", 482 | "hashlink", 483 | "libduckdb-sys", 484 | "memchr", 485 | "num-integer", 486 | "rust_decimal", 487 | "smallvec", 488 | "strum 0.25.0", 489 | ] 490 | 491 | [[package]] 492 | name = "duckdb_athena_rust" 493 | version = "0.1.0" 494 | dependencies = [ 495 | "bindgen", 496 | "build_script", 497 | "cc", 498 | "duckdb", 499 | "libduckdb-sys", 500 | ] 501 | 502 | [[package]] 503 | name = "either" 504 | version = "1.13.0" 505 | source = "registry+https://github.com/rust-lang/crates.io-index" 506 | checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" 507 | 508 | [[package]] 509 | name = "equivalent" 510 | version = "1.0.1" 511 | source = "registry+https://github.com/rust-lang/crates.io-index" 512 | checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" 513 | 514 | [[package]] 515 | name = "errno" 516 | version = "0.3.10" 517 | source = "registry+https://github.com/rust-lang/crates.io-index" 518 | checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" 519 | dependencies = [ 520 | "libc", 521 | "windows-sys", 522 | ] 523 | 524 | [[package]] 525 | name = "fallible-iterator" 526 | version = "0.3.0" 527 | source = "registry+https://github.com/rust-lang/crates.io-index" 528 | checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" 529 | 530 | [[package]] 531 | name = "fallible-streaming-iterator" 532 | version = "0.1.9" 533 | source = "registry+https://github.com/rust-lang/crates.io-index" 534 | checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" 535 | 536 | [[package]] 537 | name = "filetime" 538 | version = "0.2.25" 539 | source = "registry+https://github.com/rust-lang/crates.io-index" 540 | checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" 541 | dependencies = [ 542 | "cfg-if", 543 | "libc", 544 | "libredox", 545 | "windows-sys", 546 | ] 547 | 548 | [[package]] 549 | name = "flate2" 550 | version = "1.0.35" 551 | source = "registry+https://github.com/rust-lang/crates.io-index" 552 | checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" 553 | dependencies = [ 554 | "crc32fast", 555 | "miniz_oxide", 556 | ] 557 | 558 | [[package]] 559 | name = "funty" 560 | version = "2.0.0" 561 | source = "registry+https://github.com/rust-lang/crates.io-index" 562 | checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" 563 | 564 | [[package]] 565 | name = "getrandom" 566 | version = "0.2.15" 567 | source = "registry+https://github.com/rust-lang/crates.io-index" 568 | checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" 569 | dependencies = [ 570 | "cfg-if", 571 | "libc", 572 | "wasi", 573 | ] 574 | 575 | [[package]] 576 | name = "glob" 577 | version = "0.3.1" 578 | source = "registry+https://github.com/rust-lang/crates.io-index" 579 | checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" 580 | 581 | [[package]] 582 | name = "half" 583 | version = "2.4.1" 584 | source = "registry+https://github.com/rust-lang/crates.io-index" 585 | checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" 586 | dependencies = [ 587 | "cfg-if", 588 | "crunchy", 589 | "num-traits", 590 | ] 591 | 592 | [[package]] 593 | name = "hashbrown" 594 | version = "0.12.3" 595 | source = "registry+https://github.com/rust-lang/crates.io-index" 596 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 597 | dependencies = [ 598 | "ahash 0.7.8", 599 | ] 600 | 601 | [[package]] 602 | name = "hashbrown" 603 | version = "0.14.5" 604 | source = "registry+https://github.com/rust-lang/crates.io-index" 605 | checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" 606 | dependencies = [ 607 | "ahash 0.8.11", 608 | ] 609 | 610 | [[package]] 611 | name = "hashbrown" 612 | version = "0.15.2" 613 | source = "registry+https://github.com/rust-lang/crates.io-index" 614 | checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" 615 | 616 | [[package]] 617 | name = "hashlink" 618 | version = "0.9.1" 619 | source = "registry+https://github.com/rust-lang/crates.io-index" 620 | checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" 621 | dependencies = [ 622 | "hashbrown 0.14.5", 623 | ] 624 | 625 | [[package]] 626 | name = "heck" 627 | version = "0.4.1" 628 | source = "registry+https://github.com/rust-lang/crates.io-index" 629 | checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" 630 | 631 | [[package]] 632 | name = "heck" 633 | version = "0.5.0" 634 | source = "registry+https://github.com/rust-lang/crates.io-index" 635 | checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" 636 | 637 | [[package]] 638 | name = "iana-time-zone" 639 | version = "0.1.61" 640 | source = "registry+https://github.com/rust-lang/crates.io-index" 641 | checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" 642 | dependencies = [ 643 | "android_system_properties", 644 | "core-foundation-sys", 645 | "iana-time-zone-haiku", 646 | "js-sys", 647 | "wasm-bindgen", 648 | "windows-core", 649 | ] 650 | 651 | [[package]] 652 | name = "iana-time-zone-haiku" 653 | version = "0.1.2" 654 | source = "registry+https://github.com/rust-lang/crates.io-index" 655 | checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" 656 | dependencies = [ 657 | "cc", 658 | ] 659 | 660 | [[package]] 661 | name = "indexmap" 662 | version = "2.7.0" 663 | source = "registry+https://github.com/rust-lang/crates.io-index" 664 | checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" 665 | dependencies = [ 666 | "equivalent", 667 | "hashbrown 0.15.2", 668 | ] 669 | 670 | [[package]] 671 | name = "itertools" 672 | version = "0.13.0" 673 | source = "registry+https://github.com/rust-lang/crates.io-index" 674 | checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" 675 | dependencies = [ 676 | "either", 677 | ] 678 | 679 | [[package]] 680 | name = "itoa" 681 | version = "1.0.14" 682 | source = "registry+https://github.com/rust-lang/crates.io-index" 683 | checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" 684 | 685 | [[package]] 686 | name = "jobserver" 687 | version = "0.1.32" 688 | source = "registry+https://github.com/rust-lang/crates.io-index" 689 | checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" 690 | dependencies = [ 691 | "libc", 692 | ] 693 | 694 | [[package]] 695 | name = "js-sys" 696 | version = "0.3.76" 697 | source = "registry+https://github.com/rust-lang/crates.io-index" 698 | checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7" 699 | dependencies = [ 700 | "once_cell", 701 | "wasm-bindgen", 702 | ] 703 | 704 | [[package]] 705 | name = "lexical-core" 706 | version = "1.0.5" 707 | source = "registry+https://github.com/rust-lang/crates.io-index" 708 | checksum = "b765c31809609075565a70b4b71402281283aeda7ecaf4818ac14a7b2ade8958" 709 | dependencies = [ 710 | "lexical-parse-float", 711 | "lexical-parse-integer", 712 | "lexical-util", 713 | "lexical-write-float", 714 | "lexical-write-integer", 715 | ] 716 | 717 | [[package]] 718 | name = "lexical-parse-float" 719 | version = "1.0.5" 720 | source = "registry+https://github.com/rust-lang/crates.io-index" 721 | checksum = "de6f9cb01fb0b08060209a057c048fcbab8717b4c1ecd2eac66ebfe39a65b0f2" 722 | dependencies = [ 723 | "lexical-parse-integer", 724 | "lexical-util", 725 | "static_assertions", 726 | ] 727 | 728 | [[package]] 729 | name = "lexical-parse-integer" 730 | version = "1.0.5" 731 | source = "registry+https://github.com/rust-lang/crates.io-index" 732 | checksum = "72207aae22fc0a121ba7b6d479e42cbfea549af1479c3f3a4f12c70dd66df12e" 733 | dependencies = [ 734 | "lexical-util", 735 | "static_assertions", 736 | ] 737 | 738 | [[package]] 739 | name = "lexical-util" 740 | version = "1.0.6" 741 | source = "registry+https://github.com/rust-lang/crates.io-index" 742 | checksum = "5a82e24bf537fd24c177ffbbdc6ebcc8d54732c35b50a3f28cc3f4e4c949a0b3" 743 | dependencies = [ 744 | "static_assertions", 745 | ] 746 | 747 | [[package]] 748 | name = "lexical-write-float" 749 | version = "1.0.5" 750 | source = "registry+https://github.com/rust-lang/crates.io-index" 751 | checksum = "c5afc668a27f460fb45a81a757b6bf2f43c2d7e30cb5a2dcd3abf294c78d62bd" 752 | dependencies = [ 753 | "lexical-util", 754 | "lexical-write-integer", 755 | "static_assertions", 756 | ] 757 | 758 | [[package]] 759 | name = "lexical-write-integer" 760 | version = "1.0.5" 761 | source = "registry+https://github.com/rust-lang/crates.io-index" 762 | checksum = "629ddff1a914a836fb245616a7888b62903aae58fa771e1d83943035efa0f978" 763 | dependencies = [ 764 | "lexical-util", 765 | "static_assertions", 766 | ] 767 | 768 | [[package]] 769 | name = "libc" 770 | version = "0.2.169" 771 | source = "registry+https://github.com/rust-lang/crates.io-index" 772 | checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" 773 | 774 | [[package]] 775 | name = "libduckdb-sys" 776 | version = "1.1.1" 777 | source = "registry+https://github.com/rust-lang/crates.io-index" 778 | checksum = "eac2de5219db852597558df5dcd617ffccd5cbd7b9f5402ccbf899aca6cb6047" 779 | dependencies = [ 780 | "autocfg", 781 | "cc", 782 | "flate2", 783 | "pkg-config", 784 | "serde", 785 | "serde_json", 786 | "tar", 787 | "vcpkg", 788 | ] 789 | 790 | [[package]] 791 | name = "libloading" 792 | version = "0.8.6" 793 | source = "registry+https://github.com/rust-lang/crates.io-index" 794 | checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" 795 | dependencies = [ 796 | "cfg-if", 797 | "windows-targets", 798 | ] 799 | 800 | [[package]] 801 | name = "libm" 802 | version = "0.2.11" 803 | source = "registry+https://github.com/rust-lang/crates.io-index" 804 | checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" 805 | 806 | [[package]] 807 | name = "libredox" 808 | version = "0.1.3" 809 | source = "registry+https://github.com/rust-lang/crates.io-index" 810 | checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" 811 | dependencies = [ 812 | "bitflags", 813 | "libc", 814 | "redox_syscall", 815 | ] 816 | 817 | [[package]] 818 | name = "linux-raw-sys" 819 | version = "0.4.14" 820 | source = "registry+https://github.com/rust-lang/crates.io-index" 821 | checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" 822 | 823 | [[package]] 824 | name = "log" 825 | version = "0.4.22" 826 | source = "registry+https://github.com/rust-lang/crates.io-index" 827 | checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" 828 | 829 | [[package]] 830 | name = "memchr" 831 | version = "2.7.4" 832 | source = "registry+https://github.com/rust-lang/crates.io-index" 833 | checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" 834 | 835 | [[package]] 836 | name = "minimal-lexical" 837 | version = "0.2.1" 838 | source = "registry+https://github.com/rust-lang/crates.io-index" 839 | checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" 840 | 841 | [[package]] 842 | name = "miniz_oxide" 843 | version = "0.8.2" 844 | source = "registry+https://github.com/rust-lang/crates.io-index" 845 | checksum = "4ffbe83022cedc1d264172192511ae958937694cd57ce297164951b8b3568394" 846 | dependencies = [ 847 | "adler2", 848 | ] 849 | 850 | [[package]] 851 | name = "nom" 852 | version = "7.1.3" 853 | source = "registry+https://github.com/rust-lang/crates.io-index" 854 | checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" 855 | dependencies = [ 856 | "memchr", 857 | "minimal-lexical", 858 | ] 859 | 860 | [[package]] 861 | name = "num" 862 | version = "0.4.3" 863 | source = "registry+https://github.com/rust-lang/crates.io-index" 864 | checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" 865 | dependencies = [ 866 | "num-bigint", 867 | "num-complex", 868 | "num-integer", 869 | "num-iter", 870 | "num-rational", 871 | "num-traits", 872 | ] 873 | 874 | [[package]] 875 | name = "num-bigint" 876 | version = "0.4.6" 877 | source = "registry+https://github.com/rust-lang/crates.io-index" 878 | checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" 879 | dependencies = [ 880 | "num-integer", 881 | "num-traits", 882 | ] 883 | 884 | [[package]] 885 | name = "num-complex" 886 | version = "0.4.6" 887 | source = "registry+https://github.com/rust-lang/crates.io-index" 888 | checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" 889 | dependencies = [ 890 | "num-traits", 891 | ] 892 | 893 | [[package]] 894 | name = "num-integer" 895 | version = "0.1.46" 896 | source = "registry+https://github.com/rust-lang/crates.io-index" 897 | checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" 898 | dependencies = [ 899 | "num-traits", 900 | ] 901 | 902 | [[package]] 903 | name = "num-iter" 904 | version = "0.1.45" 905 | source = "registry+https://github.com/rust-lang/crates.io-index" 906 | checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" 907 | dependencies = [ 908 | "autocfg", 909 | "num-integer", 910 | "num-traits", 911 | ] 912 | 913 | [[package]] 914 | name = "num-rational" 915 | version = "0.4.2" 916 | source = "registry+https://github.com/rust-lang/crates.io-index" 917 | checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" 918 | dependencies = [ 919 | "num-bigint", 920 | "num-integer", 921 | "num-traits", 922 | ] 923 | 924 | [[package]] 925 | name = "num-traits" 926 | version = "0.2.19" 927 | source = "registry+https://github.com/rust-lang/crates.io-index" 928 | checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" 929 | dependencies = [ 930 | "autocfg", 931 | "libm", 932 | ] 933 | 934 | [[package]] 935 | name = "once_cell" 936 | version = "1.20.2" 937 | source = "registry+https://github.com/rust-lang/crates.io-index" 938 | checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" 939 | 940 | [[package]] 941 | name = "pkg-config" 942 | version = "0.3.31" 943 | source = "registry+https://github.com/rust-lang/crates.io-index" 944 | checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" 945 | 946 | [[package]] 947 | name = "ppv-lite86" 948 | version = "0.2.20" 949 | source = "registry+https://github.com/rust-lang/crates.io-index" 950 | checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" 951 | dependencies = [ 952 | "zerocopy", 953 | ] 954 | 955 | [[package]] 956 | name = "prettyplease" 957 | version = "0.2.25" 958 | source = "registry+https://github.com/rust-lang/crates.io-index" 959 | checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" 960 | dependencies = [ 961 | "proc-macro2", 962 | "syn 2.0.90", 963 | ] 964 | 965 | [[package]] 966 | name = "proc-macro-crate" 967 | version = "3.2.0" 968 | source = "registry+https://github.com/rust-lang/crates.io-index" 969 | checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" 970 | dependencies = [ 971 | "toml_edit", 972 | ] 973 | 974 | [[package]] 975 | name = "proc-macro2" 976 | version = "1.0.92" 977 | source = "registry+https://github.com/rust-lang/crates.io-index" 978 | checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" 979 | dependencies = [ 980 | "unicode-ident", 981 | ] 982 | 983 | [[package]] 984 | name = "ptr_meta" 985 | version = "0.1.4" 986 | source = "registry+https://github.com/rust-lang/crates.io-index" 987 | checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" 988 | dependencies = [ 989 | "ptr_meta_derive", 990 | ] 991 | 992 | [[package]] 993 | name = "ptr_meta_derive" 994 | version = "0.1.4" 995 | source = "registry+https://github.com/rust-lang/crates.io-index" 996 | checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" 997 | dependencies = [ 998 | "proc-macro2", 999 | "quote", 1000 | "syn 1.0.109", 1001 | ] 1002 | 1003 | [[package]] 1004 | name = "quote" 1005 | version = "1.0.37" 1006 | source = "registry+https://github.com/rust-lang/crates.io-index" 1007 | checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" 1008 | dependencies = [ 1009 | "proc-macro2", 1010 | ] 1011 | 1012 | [[package]] 1013 | name = "radium" 1014 | version = "0.7.0" 1015 | source = "registry+https://github.com/rust-lang/crates.io-index" 1016 | checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" 1017 | 1018 | [[package]] 1019 | name = "rand" 1020 | version = "0.8.5" 1021 | source = "registry+https://github.com/rust-lang/crates.io-index" 1022 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 1023 | dependencies = [ 1024 | "libc", 1025 | "rand_chacha", 1026 | "rand_core", 1027 | ] 1028 | 1029 | [[package]] 1030 | name = "rand_chacha" 1031 | version = "0.3.1" 1032 | source = "registry+https://github.com/rust-lang/crates.io-index" 1033 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 1034 | dependencies = [ 1035 | "ppv-lite86", 1036 | "rand_core", 1037 | ] 1038 | 1039 | [[package]] 1040 | name = "rand_core" 1041 | version = "0.6.4" 1042 | source = "registry+https://github.com/rust-lang/crates.io-index" 1043 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 1044 | dependencies = [ 1045 | "getrandom", 1046 | ] 1047 | 1048 | [[package]] 1049 | name = "redox_syscall" 1050 | version = "0.5.8" 1051 | source = "registry+https://github.com/rust-lang/crates.io-index" 1052 | checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" 1053 | dependencies = [ 1054 | "bitflags", 1055 | ] 1056 | 1057 | [[package]] 1058 | name = "regex" 1059 | version = "1.11.1" 1060 | source = "registry+https://github.com/rust-lang/crates.io-index" 1061 | checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" 1062 | dependencies = [ 1063 | "aho-corasick", 1064 | "memchr", 1065 | "regex-automata", 1066 | "regex-syntax", 1067 | ] 1068 | 1069 | [[package]] 1070 | name = "regex-automata" 1071 | version = "0.4.9" 1072 | source = "registry+https://github.com/rust-lang/crates.io-index" 1073 | checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" 1074 | dependencies = [ 1075 | "aho-corasick", 1076 | "memchr", 1077 | "regex-syntax", 1078 | ] 1079 | 1080 | [[package]] 1081 | name = "regex-syntax" 1082 | version = "0.8.5" 1083 | source = "registry+https://github.com/rust-lang/crates.io-index" 1084 | checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" 1085 | 1086 | [[package]] 1087 | name = "rend" 1088 | version = "0.4.2" 1089 | source = "registry+https://github.com/rust-lang/crates.io-index" 1090 | checksum = "71fe3824f5629716b1589be05dacd749f6aa084c87e00e016714a8cdfccc997c" 1091 | dependencies = [ 1092 | "bytecheck", 1093 | ] 1094 | 1095 | [[package]] 1096 | name = "rkyv" 1097 | version = "0.7.45" 1098 | source = "registry+https://github.com/rust-lang/crates.io-index" 1099 | checksum = "9008cd6385b9e161d8229e1f6549dd23c3d022f132a2ea37ac3a10ac4935779b" 1100 | dependencies = [ 1101 | "bitvec", 1102 | "bytecheck", 1103 | "bytes", 1104 | "hashbrown 0.12.3", 1105 | "ptr_meta", 1106 | "rend", 1107 | "rkyv_derive", 1108 | "seahash", 1109 | "tinyvec", 1110 | "uuid", 1111 | ] 1112 | 1113 | [[package]] 1114 | name = "rkyv_derive" 1115 | version = "0.7.45" 1116 | source = "registry+https://github.com/rust-lang/crates.io-index" 1117 | checksum = "503d1d27590a2b0a3a4ca4c94755aa2875657196ecbf401a42eff41d7de532c0" 1118 | dependencies = [ 1119 | "proc-macro2", 1120 | "quote", 1121 | "syn 1.0.109", 1122 | ] 1123 | 1124 | [[package]] 1125 | name = "rust_decimal" 1126 | version = "1.36.0" 1127 | source = "registry+https://github.com/rust-lang/crates.io-index" 1128 | checksum = "b082d80e3e3cc52b2ed634388d436fe1f4de6af5786cc2de9ba9737527bdf555" 1129 | dependencies = [ 1130 | "arrayvec", 1131 | "borsh", 1132 | "bytes", 1133 | "num-traits", 1134 | "rand", 1135 | "rkyv", 1136 | "serde", 1137 | "serde_json", 1138 | ] 1139 | 1140 | [[package]] 1141 | name = "rustc-hash" 1142 | version = "2.1.0" 1143 | source = "registry+https://github.com/rust-lang/crates.io-index" 1144 | checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497" 1145 | 1146 | [[package]] 1147 | name = "rustix" 1148 | version = "0.38.42" 1149 | source = "registry+https://github.com/rust-lang/crates.io-index" 1150 | checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85" 1151 | dependencies = [ 1152 | "bitflags", 1153 | "errno", 1154 | "libc", 1155 | "linux-raw-sys", 1156 | "windows-sys", 1157 | ] 1158 | 1159 | [[package]] 1160 | name = "rustversion" 1161 | version = "1.0.18" 1162 | source = "registry+https://github.com/rust-lang/crates.io-index" 1163 | checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" 1164 | 1165 | [[package]] 1166 | name = "ryu" 1167 | version = "1.0.18" 1168 | source = "registry+https://github.com/rust-lang/crates.io-index" 1169 | checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" 1170 | 1171 | [[package]] 1172 | name = "seahash" 1173 | version = "4.1.0" 1174 | source = "registry+https://github.com/rust-lang/crates.io-index" 1175 | checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" 1176 | 1177 | [[package]] 1178 | name = "serde" 1179 | version = "1.0.216" 1180 | source = "registry+https://github.com/rust-lang/crates.io-index" 1181 | checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e" 1182 | dependencies = [ 1183 | "serde_derive", 1184 | ] 1185 | 1186 | [[package]] 1187 | name = "serde_derive" 1188 | version = "1.0.216" 1189 | source = "registry+https://github.com/rust-lang/crates.io-index" 1190 | checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e" 1191 | dependencies = [ 1192 | "proc-macro2", 1193 | "quote", 1194 | "syn 2.0.90", 1195 | ] 1196 | 1197 | [[package]] 1198 | name = "serde_json" 1199 | version = "1.0.133" 1200 | source = "registry+https://github.com/rust-lang/crates.io-index" 1201 | checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" 1202 | dependencies = [ 1203 | "itoa", 1204 | "memchr", 1205 | "ryu", 1206 | "serde", 1207 | ] 1208 | 1209 | [[package]] 1210 | name = "shlex" 1211 | version = "1.3.0" 1212 | source = "registry+https://github.com/rust-lang/crates.io-index" 1213 | checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" 1214 | 1215 | [[package]] 1216 | name = "simdutf8" 1217 | version = "0.1.5" 1218 | source = "registry+https://github.com/rust-lang/crates.io-index" 1219 | checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" 1220 | 1221 | [[package]] 1222 | name = "smallvec" 1223 | version = "1.13.2" 1224 | source = "registry+https://github.com/rust-lang/crates.io-index" 1225 | checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" 1226 | 1227 | [[package]] 1228 | name = "static_assertions" 1229 | version = "1.1.0" 1230 | source = "registry+https://github.com/rust-lang/crates.io-index" 1231 | checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" 1232 | 1233 | [[package]] 1234 | name = "strum" 1235 | version = "0.25.0" 1236 | source = "registry+https://github.com/rust-lang/crates.io-index" 1237 | checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" 1238 | dependencies = [ 1239 | "strum_macros 0.25.3", 1240 | ] 1241 | 1242 | [[package]] 1243 | name = "strum" 1244 | version = "0.26.3" 1245 | source = "registry+https://github.com/rust-lang/crates.io-index" 1246 | checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" 1247 | 1248 | [[package]] 1249 | name = "strum_macros" 1250 | version = "0.25.3" 1251 | source = "registry+https://github.com/rust-lang/crates.io-index" 1252 | checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" 1253 | dependencies = [ 1254 | "heck 0.4.1", 1255 | "proc-macro2", 1256 | "quote", 1257 | "rustversion", 1258 | "syn 2.0.90", 1259 | ] 1260 | 1261 | [[package]] 1262 | name = "strum_macros" 1263 | version = "0.26.4" 1264 | source = "registry+https://github.com/rust-lang/crates.io-index" 1265 | checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" 1266 | dependencies = [ 1267 | "heck 0.5.0", 1268 | "proc-macro2", 1269 | "quote", 1270 | "rustversion", 1271 | "syn 2.0.90", 1272 | ] 1273 | 1274 | [[package]] 1275 | name = "syn" 1276 | version = "1.0.109" 1277 | source = "registry+https://github.com/rust-lang/crates.io-index" 1278 | checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 1279 | dependencies = [ 1280 | "proc-macro2", 1281 | "quote", 1282 | "unicode-ident", 1283 | ] 1284 | 1285 | [[package]] 1286 | name = "syn" 1287 | version = "2.0.90" 1288 | source = "registry+https://github.com/rust-lang/crates.io-index" 1289 | checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" 1290 | dependencies = [ 1291 | "proc-macro2", 1292 | "quote", 1293 | "unicode-ident", 1294 | ] 1295 | 1296 | [[package]] 1297 | name = "tap" 1298 | version = "1.0.1" 1299 | source = "registry+https://github.com/rust-lang/crates.io-index" 1300 | checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" 1301 | 1302 | [[package]] 1303 | name = "tar" 1304 | version = "0.4.43" 1305 | source = "registry+https://github.com/rust-lang/crates.io-index" 1306 | checksum = "c65998313f8e17d0d553d28f91a0df93e4dbbbf770279c7bc21ca0f09ea1a1f6" 1307 | dependencies = [ 1308 | "filetime", 1309 | "libc", 1310 | "xattr", 1311 | ] 1312 | 1313 | [[package]] 1314 | name = "tiny-keccak" 1315 | version = "2.0.2" 1316 | source = "registry+https://github.com/rust-lang/crates.io-index" 1317 | checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" 1318 | dependencies = [ 1319 | "crunchy", 1320 | ] 1321 | 1322 | [[package]] 1323 | name = "tinyvec" 1324 | version = "1.8.0" 1325 | source = "registry+https://github.com/rust-lang/crates.io-index" 1326 | checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" 1327 | dependencies = [ 1328 | "tinyvec_macros", 1329 | ] 1330 | 1331 | [[package]] 1332 | name = "tinyvec_macros" 1333 | version = "0.1.1" 1334 | source = "registry+https://github.com/rust-lang/crates.io-index" 1335 | checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 1336 | 1337 | [[package]] 1338 | name = "toml_datetime" 1339 | version = "0.6.8" 1340 | source = "registry+https://github.com/rust-lang/crates.io-index" 1341 | checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" 1342 | 1343 | [[package]] 1344 | name = "toml_edit" 1345 | version = "0.22.22" 1346 | source = "registry+https://github.com/rust-lang/crates.io-index" 1347 | checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" 1348 | dependencies = [ 1349 | "indexmap", 1350 | "toml_datetime", 1351 | "winnow", 1352 | ] 1353 | 1354 | [[package]] 1355 | name = "unicode-ident" 1356 | version = "1.0.14" 1357 | source = "registry+https://github.com/rust-lang/crates.io-index" 1358 | checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" 1359 | 1360 | [[package]] 1361 | name = "unicode-width" 1362 | version = "0.2.0" 1363 | source = "registry+https://github.com/rust-lang/crates.io-index" 1364 | checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" 1365 | 1366 | [[package]] 1367 | name = "uuid" 1368 | version = "1.11.0" 1369 | source = "registry+https://github.com/rust-lang/crates.io-index" 1370 | checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" 1371 | 1372 | [[package]] 1373 | name = "vcpkg" 1374 | version = "0.2.15" 1375 | source = "registry+https://github.com/rust-lang/crates.io-index" 1376 | checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 1377 | 1378 | [[package]] 1379 | name = "version_check" 1380 | version = "0.9.5" 1381 | source = "registry+https://github.com/rust-lang/crates.io-index" 1382 | checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" 1383 | 1384 | [[package]] 1385 | name = "wasi" 1386 | version = "0.11.0+wasi-snapshot-preview1" 1387 | source = "registry+https://github.com/rust-lang/crates.io-index" 1388 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 1389 | 1390 | [[package]] 1391 | name = "wasm-bindgen" 1392 | version = "0.2.99" 1393 | source = "registry+https://github.com/rust-lang/crates.io-index" 1394 | checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396" 1395 | dependencies = [ 1396 | "cfg-if", 1397 | "once_cell", 1398 | "wasm-bindgen-macro", 1399 | ] 1400 | 1401 | [[package]] 1402 | name = "wasm-bindgen-backend" 1403 | version = "0.2.99" 1404 | source = "registry+https://github.com/rust-lang/crates.io-index" 1405 | checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79" 1406 | dependencies = [ 1407 | "bumpalo", 1408 | "log", 1409 | "proc-macro2", 1410 | "quote", 1411 | "syn 2.0.90", 1412 | "wasm-bindgen-shared", 1413 | ] 1414 | 1415 | [[package]] 1416 | name = "wasm-bindgen-macro" 1417 | version = "0.2.99" 1418 | source = "registry+https://github.com/rust-lang/crates.io-index" 1419 | checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe" 1420 | dependencies = [ 1421 | "quote", 1422 | "wasm-bindgen-macro-support", 1423 | ] 1424 | 1425 | [[package]] 1426 | name = "wasm-bindgen-macro-support" 1427 | version = "0.2.99" 1428 | source = "registry+https://github.com/rust-lang/crates.io-index" 1429 | checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" 1430 | dependencies = [ 1431 | "proc-macro2", 1432 | "quote", 1433 | "syn 2.0.90", 1434 | "wasm-bindgen-backend", 1435 | "wasm-bindgen-shared", 1436 | ] 1437 | 1438 | [[package]] 1439 | name = "wasm-bindgen-shared" 1440 | version = "0.2.99" 1441 | source = "registry+https://github.com/rust-lang/crates.io-index" 1442 | checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" 1443 | 1444 | [[package]] 1445 | name = "windows-core" 1446 | version = "0.52.0" 1447 | source = "registry+https://github.com/rust-lang/crates.io-index" 1448 | checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" 1449 | dependencies = [ 1450 | "windows-targets", 1451 | ] 1452 | 1453 | [[package]] 1454 | name = "windows-sys" 1455 | version = "0.59.0" 1456 | source = "registry+https://github.com/rust-lang/crates.io-index" 1457 | checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" 1458 | dependencies = [ 1459 | "windows-targets", 1460 | ] 1461 | 1462 | [[package]] 1463 | name = "windows-targets" 1464 | version = "0.52.6" 1465 | source = "registry+https://github.com/rust-lang/crates.io-index" 1466 | checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" 1467 | dependencies = [ 1468 | "windows_aarch64_gnullvm", 1469 | "windows_aarch64_msvc", 1470 | "windows_i686_gnu", 1471 | "windows_i686_gnullvm", 1472 | "windows_i686_msvc", 1473 | "windows_x86_64_gnu", 1474 | "windows_x86_64_gnullvm", 1475 | "windows_x86_64_msvc", 1476 | ] 1477 | 1478 | [[package]] 1479 | name = "windows_aarch64_gnullvm" 1480 | version = "0.52.6" 1481 | source = "registry+https://github.com/rust-lang/crates.io-index" 1482 | checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" 1483 | 1484 | [[package]] 1485 | name = "windows_aarch64_msvc" 1486 | version = "0.52.6" 1487 | source = "registry+https://github.com/rust-lang/crates.io-index" 1488 | checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" 1489 | 1490 | [[package]] 1491 | name = "windows_i686_gnu" 1492 | version = "0.52.6" 1493 | source = "registry+https://github.com/rust-lang/crates.io-index" 1494 | checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" 1495 | 1496 | [[package]] 1497 | name = "windows_i686_gnullvm" 1498 | version = "0.52.6" 1499 | source = "registry+https://github.com/rust-lang/crates.io-index" 1500 | checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" 1501 | 1502 | [[package]] 1503 | name = "windows_i686_msvc" 1504 | version = "0.52.6" 1505 | source = "registry+https://github.com/rust-lang/crates.io-index" 1506 | checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" 1507 | 1508 | [[package]] 1509 | name = "windows_x86_64_gnu" 1510 | version = "0.52.6" 1511 | source = "registry+https://github.com/rust-lang/crates.io-index" 1512 | checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" 1513 | 1514 | [[package]] 1515 | name = "windows_x86_64_gnullvm" 1516 | version = "0.52.6" 1517 | source = "registry+https://github.com/rust-lang/crates.io-index" 1518 | checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" 1519 | 1520 | [[package]] 1521 | name = "windows_x86_64_msvc" 1522 | version = "0.52.6" 1523 | source = "registry+https://github.com/rust-lang/crates.io-index" 1524 | checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" 1525 | 1526 | [[package]] 1527 | name = "winnow" 1528 | version = "0.6.20" 1529 | source = "registry+https://github.com/rust-lang/crates.io-index" 1530 | checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" 1531 | dependencies = [ 1532 | "memchr", 1533 | ] 1534 | 1535 | [[package]] 1536 | name = "wyz" 1537 | version = "0.5.1" 1538 | source = "registry+https://github.com/rust-lang/crates.io-index" 1539 | checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" 1540 | dependencies = [ 1541 | "tap", 1542 | ] 1543 | 1544 | [[package]] 1545 | name = "xattr" 1546 | version = "1.3.1" 1547 | source = "registry+https://github.com/rust-lang/crates.io-index" 1548 | checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" 1549 | dependencies = [ 1550 | "libc", 1551 | "linux-raw-sys", 1552 | "rustix", 1553 | ] 1554 | 1555 | [[package]] 1556 | name = "zerocopy" 1557 | version = "0.7.35" 1558 | source = "registry+https://github.com/rust-lang/crates.io-index" 1559 | checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" 1560 | dependencies = [ 1561 | "byteorder", 1562 | "zerocopy-derive", 1563 | ] 1564 | 1565 | [[package]] 1566 | name = "zerocopy-derive" 1567 | version = "0.7.35" 1568 | source = "registry+https://github.com/rust-lang/crates.io-index" 1569 | checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" 1570 | dependencies = [ 1571 | "proc-macro2", 1572 | "quote", 1573 | "syn 2.0.90", 1574 | ] 1575 | -------------------------------------------------------------------------------- /duckdb_athena_rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "duckdb_athena_rust" 3 | version = "0.1.0" 4 | edition = "2021" 5 | publish = false 6 | 7 | [lib] 8 | name = "duckdb_athena_rust" 9 | crate-type = ["staticlib", "rlib"] 10 | 11 | [dependencies] 12 | duckdb = { version = "1.1.1", features = ["bundled"] } 13 | libduckdb-sys = "1.1.1" 14 | 15 | [build-dependencies] 16 | bindgen = "0.71.1" 17 | build_script = "0.2.0" 18 | cc = "1.0.78" 19 | -------------------------------------------------------------------------------- /duckdb_athena_rust/README.md: -------------------------------------------------------------------------------- 1 | # DuckDB Rust Extension Toolkit 2 | 3 | 4 | ## Credits 5 | 6 | This library was inspired by DuckDB Extension Framework](https://github.com/Mause/duckdb-extension-framework] 7 | -------------------------------------------------------------------------------- /duckdb_athena_rust/build.rs: -------------------------------------------------------------------------------- 1 | use build_script::cargo_rerun_if_changed; 2 | use std::path::PathBuf; 3 | use std::{env, path::Path}; 4 | 5 | fn main() { 6 | let duckdb_root = Path::new(&env::var("CARGO_MANIFEST_DIR").unwrap()) 7 | .join("duckdb") 8 | .canonicalize() 9 | .expect("duckdb source root"); 10 | 11 | let header = "src/duckdb_athena_rust.h"; 12 | cargo_rerun_if_changed(header); 13 | 14 | let duckdb_include = duckdb_root.join("src/include"); 15 | let bindings = bindgen::Builder::default() 16 | .header(header) 17 | .clang_arg("-xc++") 18 | .clang_arg("-I") 19 | .clang_arg(duckdb_include.to_string_lossy()) 20 | .derive_debug(true) 21 | .derive_default(true) 22 | .parse_callbacks(Box::new(bindgen::CargoCallbacks::new())) 23 | .generate() 24 | .expect("Unable to generate bindings"); 25 | 26 | let out_path = PathBuf::from(env::var("OUT_DIR").unwrap()); 27 | bindings 28 | .write_to_file(out_path.join("bindings.rs")) 29 | .expect("Couldn't write bindings!"); 30 | 31 | cc::Build::new() 32 | .include(duckdb_include) 33 | .include("duckdb/src/include") // Relative import due to https://github.com/rust-lang/cc-rs/issues/169 34 | .flag_if_supported("-Wno-unused-parameter") 35 | .flag_if_supported("-Wno-redundant-move") 36 | .flag_if_supported("-std=c++17") 37 | .cpp(true) 38 | .file("src/duckdb_athena_rust.cc") 39 | .compile("duckdb_athena_rust"); 40 | } 41 | -------------------------------------------------------------------------------- /duckdb_athena_rust/cbindgen.toml: -------------------------------------------------------------------------------- 1 | # This is a template cbindgen.toml file with all of the default values. 2 | # Some values are commented out because their absence is the real default. 3 | # 4 | # See https://github.com/mozilla/cbindgen/blob/master/docs.md#cbindgentoml 5 | # for detailed documentation of every option here. 6 | 7 | 8 | 9 | language = "C++" 10 | 11 | 12 | 13 | ############## Options for Wrapping the Contents of the Header ################# 14 | 15 | # header = "/* Text to put at the beginning of the generated file. Probably a license. */" 16 | # trailer = "/* Text to put at the end of the generated file */" 17 | # include_guard = "my_bindings_h" 18 | # pragma_once = true 19 | # autogen_warning = "/* Warning, this file is autogenerated by cbindgen. Don't modify this manually. */" 20 | include_version = false 21 | # namespace = "my_namespace" 22 | namespaces = [] 23 | using_namespaces = [] 24 | sys_includes = [] 25 | includes = [] 26 | no_includes = false 27 | # cpp_compat = true 28 | after_includes = "" 29 | 30 | 31 | 32 | 33 | ############################ Code Style Options ################################ 34 | 35 | braces = "SameLine" 36 | line_length = 100 37 | tab_width = 2 38 | documentation = true 39 | documentation_style = "auto" 40 | documentation_length = "full" 41 | line_endings = "LF" # also "CR", "CRLF", "Native" 42 | 43 | 44 | 45 | 46 | ############################# Codegen Options ################################## 47 | 48 | style = "both" 49 | sort_by = "Name" # default for `fn.sort_by` and `const.sort_by` 50 | usize_is_size_t = true 51 | 52 | 53 | 54 | [defines] 55 | # "target_os = freebsd" = "DEFINE_FREEBSD" 56 | # "feature = serde" = "DEFINE_SERDE" 57 | 58 | 59 | 60 | [export] 61 | include = [] 62 | exclude = [] 63 | # prefix = "CAPI_" 64 | item_types = [] 65 | renaming_overrides_prefixing = false 66 | 67 | 68 | 69 | [export.rename] 70 | 71 | 72 | 73 | [export.body] 74 | 75 | 76 | [export.mangle] 77 | 78 | 79 | [fn] 80 | rename_args = "None" 81 | # must_use = "MUST_USE_FUNC" 82 | # deprecated = "DEPRECATED_FUNC" 83 | # deprecated_with_note = "DEPRECATED_FUNC_WITH_NOTE" 84 | # no_return = "NO_RETURN" 85 | # prefix = "START_FUNC" 86 | # postfix = "END_FUNC" 87 | args = "auto" 88 | sort_by = "Name" 89 | 90 | 91 | 92 | 93 | [struct] 94 | rename_fields = "None" 95 | # must_use = "MUST_USE_STRUCT" 96 | # deprecated = "DEPRECATED_STRUCT" 97 | # deprecated_with_note = "DEPRECATED_STRUCT_WITH_NOTE" 98 | derive_constructor = false 99 | derive_eq = false 100 | derive_neq = false 101 | derive_lt = false 102 | derive_lte = false 103 | derive_gt = false 104 | derive_gte = false 105 | 106 | 107 | 108 | 109 | [enum] 110 | rename_variants = "None" 111 | # must_use = "MUST_USE_ENUM" 112 | # deprecated = "DEPRECATED_ENUM" 113 | # deprecated_with_note = "DEPRECATED_ENUM_WITH_NOTE" 114 | add_sentinel = false 115 | prefix_with_name = false 116 | derive_helper_methods = false 117 | derive_const_casts = false 118 | derive_mut_casts = false 119 | # cast_assert_name = "ASSERT" 120 | derive_tagged_enum_destructor = false 121 | derive_tagged_enum_copy_constructor = false 122 | enum_class = true 123 | private_default_tagged_enum_constructor = false 124 | 125 | 126 | 127 | 128 | [const] 129 | allow_static_const = true 130 | allow_constexpr = false 131 | sort_by = "Name" 132 | 133 | 134 | 135 | 136 | [macro_expansion] 137 | bitflags = false 138 | 139 | 140 | 141 | 142 | 143 | 144 | ############## Options for How Your Rust library Should Be Parsed ############## 145 | 146 | [parse] 147 | parse_deps = false 148 | # include = [] 149 | exclude = [] 150 | clean = false 151 | extra_bindings = [] 152 | 153 | 154 | 155 | [parse.expand] 156 | crates = ["duckdb_athena_rust"] 157 | all_features = false 158 | default_features = true 159 | features = [] 160 | -------------------------------------------------------------------------------- /duckdb_athena_rust/duckdb: -------------------------------------------------------------------------------- 1 | ../duckdb -------------------------------------------------------------------------------- /duckdb_athena_rust/src/connection.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2023 Lance Developers 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | use libduckdb_sys::{duckdb_connection, duckdb_register_table_function}; 16 | use crate::table_function::TableFunction; 17 | 18 | /// A connection to a database. This represents a (client) connection that can 19 | /// be used to query the database. 20 | #[derive(Debug)] 21 | pub struct Connection { 22 | ptr: duckdb_connection, 23 | } 24 | 25 | impl From for Connection { 26 | fn from(ptr: duckdb_connection) -> Self { 27 | Self { ptr } 28 | } 29 | } 30 | 31 | impl Connection { 32 | pub fn register_table_function( 33 | &self, 34 | table_function: TableFunction, 35 | ) -> Result<(), Box> { 36 | unsafe { 37 | duckdb_register_table_function(self.ptr, table_function.ptr); 38 | } 39 | Ok(()) 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /duckdb_athena_rust/src/data_chunk.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2023 Lance Developers 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | use super::vector::{FlatVector, ListVector, StructVector}; 16 | use libduckdb_sys::{ 17 | duckdb_create_data_chunk, duckdb_data_chunk, duckdb_data_chunk_get_size, 18 | duckdb_data_chunk_get_vector, duckdb_data_chunk_set_size, duckdb_destroy_data_chunk, 19 | duckdb_data_chunk_get_column_count, 20 | }; 21 | use crate::LogicalType; 22 | 23 | /// DataChunk in DuckDB. 24 | pub struct DataChunk { 25 | /// Pointer to the DataChunk in duckdb C API. 26 | ptr: duckdb_data_chunk, 27 | 28 | /// Whether this [DataChunk] own the [DataChunk::ptr]. 29 | owned: bool, 30 | } 31 | 32 | impl DataChunk { 33 | pub fn new(logical_types: &[LogicalType]) -> Self { 34 | let num_columns = logical_types.len(); 35 | let mut c_types = logical_types.iter().map(|t| t.ptr).collect::>(); 36 | let ptr = unsafe { duckdb_create_data_chunk(c_types.as_mut_ptr(), num_columns as u64) }; 37 | DataChunk { ptr, owned: true } 38 | } 39 | 40 | /// Get the vector at the specific column index: `idx`. 41 | /// 42 | pub fn flat_vector(&self, idx: usize) -> FlatVector { 43 | FlatVector::from(unsafe { duckdb_data_chunk_get_vector(self.ptr, idx as u64) }) 44 | } 45 | 46 | /// Get a list vector from the column index. 47 | pub fn list_vector(&self, idx: usize) -> ListVector { 48 | ListVector::from(unsafe { duckdb_data_chunk_get_vector(self.ptr, idx as u64) }) 49 | } 50 | 51 | /// Get struct vector at the column index: `idx`. 52 | pub fn struct_vector(&self, idx: usize) -> StructVector { 53 | StructVector::from(unsafe { duckdb_data_chunk_get_vector(self.ptr, idx as u64) }) 54 | } 55 | 56 | /// Set the size of the data chunk 57 | pub fn set_len(&self, new_len: usize) { 58 | unsafe { duckdb_data_chunk_set_size(self.ptr, new_len as u64) }; 59 | } 60 | 61 | /// Get the length / the number of rows in this [DataChunk]. 62 | pub fn len(&self) -> usize { 63 | unsafe { duckdb_data_chunk_get_size(self.ptr) as usize } 64 | } 65 | 66 | pub fn is_empty(&self) -> bool { 67 | self.len() == 0 68 | } 69 | 70 | pub fn num_columns(&self) -> usize { 71 | unsafe { duckdb_data_chunk_get_column_count(self.ptr) as usize } 72 | } 73 | } 74 | 75 | impl From for DataChunk { 76 | fn from(ptr: duckdb_data_chunk) -> Self { 77 | Self { ptr, owned: false } 78 | } 79 | } 80 | 81 | impl Drop for DataChunk { 82 | fn drop(&mut self) { 83 | if self.owned && !self.ptr.is_null() { 84 | unsafe { duckdb_destroy_data_chunk(&mut self.ptr) } 85 | self.ptr = std::ptr::null_mut(); 86 | } 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /duckdb_athena_rust/src/database.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2023 Lance Developers 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | use libduckdb_sys::{duckdb_connect, duckdb_connection, duckdb_database, duckdb_state_DuckDBError}; 16 | use crate::{Connection, Error, Result}; 17 | 18 | pub struct Database { 19 | ptr: duckdb_database, 20 | } 21 | 22 | impl From for Database { 23 | fn from(ptr: duckdb_database) -> Self { 24 | Self { ptr } 25 | } 26 | } 27 | 28 | impl Database { 29 | pub fn connect(&self) -> Result { 30 | let mut connection: duckdb_connection = std::ptr::null_mut(); 31 | 32 | let state = unsafe { duckdb_connect(self.ptr, &mut connection) }; 33 | if state == duckdb_state_DuckDBError { 34 | return Err(Error::DuckDB("Connection error".to_string())); 35 | } 36 | 37 | Ok(Connection::from(connection)) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /duckdb_athena_rust/src/duckdb_athena_rust.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2023 Lance Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #include "duckdb_athena_rust.h" 16 | 17 | #include 18 | 19 | #include "duckdb.hpp" 20 | 21 | namespace 22 | { 23 | 24 | auto build_child_list(duckdb_logical_type *member_types, const char **member_names, idx_t member_count) 25 | { 26 | duckdb::child_list_t members; 27 | for (idx_t i = 0; i < member_count; i++) 28 | { 29 | members.emplace_back(std::string(member_names[i]), *(duckdb::LogicalType *)member_types[i]); 30 | } 31 | return members; 32 | } 33 | 34 | } // namespace 35 | 36 | extern "C" 37 | { 38 | duckdb_logical_type duckdb_create_struct_type(duckdb_logical_type *member_types, 39 | const char **member_names, 40 | idx_t member_count) 41 | { 42 | auto *stype = new duckdb::LogicalType; 43 | *stype = duckdb::LogicalType::STRUCT(build_child_list(member_types, member_names, member_count)); 44 | return reinterpret_cast(stype); 45 | ; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /duckdb_athena_rust/src/duckdb_athena_rust.h: -------------------------------------------------------------------------------- 1 | // Copyright 2023 Lance Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #define DUCKDB_BUILD_LOADABLE_EXTENSION 16 | #include "duckdb.h" 17 | 18 | extern "C" { 19 | DUCKDB_EXTENSION_API duckdb_logical_type duckdb_create_struct_type( 20 | duckdb_logical_type *member_types, const char **member_names, idx_t member_count); 21 | }; 22 | -------------------------------------------------------------------------------- /duckdb_athena_rust/src/error.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2023 Lance Developers 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | use std::ffi::CString; 16 | 17 | pub enum Error { 18 | IO(String), 19 | DuckDB(String), 20 | } 21 | 22 | pub type Result = std::result::Result; 23 | 24 | impl std::fmt::Display for Error { 25 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 26 | match self { 27 | Self::IO(s) => write!(f, "I/O: {s}"), 28 | Self::DuckDB(s) => write!(f, "I/O: {s}"), 29 | } 30 | } 31 | } 32 | 33 | impl Error { 34 | pub fn c_str(&self) -> CString { 35 | CString::new(self.to_string()).unwrap() 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /duckdb_athena_rust/src/function_info.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2023 Lance Developers 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | use libduckdb_sys::{duckdb_function_get_init_data, duckdb_function_get_bind_data, duckdb_function_info, duckdb_function_set_error}; 16 | use crate::Error; 17 | 18 | /// UDF 19 | pub struct FunctionInfo { 20 | ptr: duckdb_function_info, 21 | } 22 | 23 | impl From for FunctionInfo { 24 | fn from(ptr: duckdb_function_info) -> Self { 25 | Self { ptr } 26 | } 27 | } 28 | 29 | impl FunctionInfo { 30 | pub fn bind_data(&self) -> *mut T { 31 | unsafe { duckdb_function_get_bind_data(self.ptr).cast() } 32 | } 33 | 34 | pub fn init_data(&self) -> *mut T { 35 | unsafe { duckdb_function_get_init_data(self.ptr).cast() } 36 | } 37 | 38 | pub fn set_error(&self, error: Error) { 39 | unsafe { 40 | duckdb_function_set_error(self.ptr, error.c_str().as_ptr()); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /duckdb_athena_rust/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2023 Lance Developers 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | mod connection; 16 | mod data_chunk; 17 | mod database; 18 | mod error; 19 | mod function_info; 20 | mod logical_type; 21 | pub mod table_function; 22 | mod value; 23 | mod vector; 24 | 25 | pub use connection::Connection; 26 | pub use data_chunk::DataChunk; 27 | pub use database::Database; 28 | pub use error::{Error, Result}; 29 | pub use function_info::FunctionInfo; 30 | pub use logical_type::{LogicalType, LogicalTypeId}; 31 | pub use value::Value; 32 | pub use vector::{FlatVector, Inserter, ListVector, StructVector, Vector}; 33 | use std::mem::size_of; 34 | 35 | pub use libduckdb_sys::{duckdb_vector_size, duckdb_bind_info, duckdb_data_chunk, duckdb_free, duckdb_function_info, duckdb_init_info, _duckdb_database, duckdb_library_version}; 36 | 37 | #[allow(clippy::all)] 38 | pub mod ffi { 39 | #![allow(non_upper_case_globals)] 40 | #![allow(non_camel_case_types)] 41 | #![allow(non_snake_case)] 42 | #![allow(unused)] 43 | #![allow(improper_ctypes)] 44 | #![allow(clippy::upper_case_acronyms)] 45 | } 46 | 47 | /// # Safety 48 | /// This function is obviously unsafe 49 | pub unsafe fn malloc_struct() -> *mut T { 50 | libduckdb_sys::duckdb_malloc(size_of::()).cast::() 51 | } 52 | -------------------------------------------------------------------------------- /duckdb_athena_rust/src/logical_type.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2023 Lance Developers 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | use std::ffi::{c_char, CString}; 16 | use std::fmt::Debug; 17 | 18 | use libduckdb_sys::*; 19 | 20 | #[repr(u32)] 21 | #[derive(Debug, PartialEq, Eq)] 22 | pub enum LogicalTypeId { 23 | Boolean = DUCKDB_TYPE_DUCKDB_TYPE_BOOLEAN, 24 | Tinyint = DUCKDB_TYPE_DUCKDB_TYPE_TINYINT, 25 | Smallint = DUCKDB_TYPE_DUCKDB_TYPE_SMALLINT, 26 | Integer = DUCKDB_TYPE_DUCKDB_TYPE_INTEGER, 27 | Bigint = DUCKDB_TYPE_DUCKDB_TYPE_BIGINT, 28 | UTinyint = DUCKDB_TYPE_DUCKDB_TYPE_UTINYINT, 29 | USmallint = DUCKDB_TYPE_DUCKDB_TYPE_USMALLINT, 30 | UInteger = DUCKDB_TYPE_DUCKDB_TYPE_UINTEGER, 31 | UBigint = DUCKDB_TYPE_DUCKDB_TYPE_UBIGINT, 32 | Float = DUCKDB_TYPE_DUCKDB_TYPE_FLOAT, 33 | Double = DUCKDB_TYPE_DUCKDB_TYPE_DOUBLE, 34 | Timestamp = DUCKDB_TYPE_DUCKDB_TYPE_TIMESTAMP, 35 | Date = DUCKDB_TYPE_DUCKDB_TYPE_DATE, 36 | Time = DUCKDB_TYPE_DUCKDB_TYPE_TIME, 37 | Interval = DUCKDB_TYPE_DUCKDB_TYPE_INTERVAL, 38 | Hugeint = DUCKDB_TYPE_DUCKDB_TYPE_HUGEINT, 39 | Varchar = DUCKDB_TYPE_DUCKDB_TYPE_VARCHAR, 40 | Blob = DUCKDB_TYPE_DUCKDB_TYPE_BLOB, 41 | Decimal = DUCKDB_TYPE_DUCKDB_TYPE_DECIMAL, 42 | TimestampS = DUCKDB_TYPE_DUCKDB_TYPE_TIMESTAMP_S, 43 | TimestampMs = DUCKDB_TYPE_DUCKDB_TYPE_TIMESTAMP_MS, 44 | TimestampNs = DUCKDB_TYPE_DUCKDB_TYPE_TIMESTAMP_NS, 45 | Enum = DUCKDB_TYPE_DUCKDB_TYPE_ENUM, 46 | List = DUCKDB_TYPE_DUCKDB_TYPE_LIST, 47 | Struct = DUCKDB_TYPE_DUCKDB_TYPE_STRUCT, 48 | Map = DUCKDB_TYPE_DUCKDB_TYPE_MAP, 49 | Uuid = DUCKDB_TYPE_DUCKDB_TYPE_UUID, 50 | Union = DUCKDB_TYPE_DUCKDB_TYPE_UNION, 51 | } 52 | 53 | impl From for LogicalTypeId { 54 | fn from(value: u32) -> Self { 55 | match value { 56 | DUCKDB_TYPE_DUCKDB_TYPE_BOOLEAN => Self::Boolean, 57 | DUCKDB_TYPE_DUCKDB_TYPE_TINYINT => Self::Tinyint, 58 | DUCKDB_TYPE_DUCKDB_TYPE_SMALLINT => Self::Smallint, 59 | DUCKDB_TYPE_DUCKDB_TYPE_INTEGER => Self::Integer, 60 | DUCKDB_TYPE_DUCKDB_TYPE_BIGINT => Self::Bigint, 61 | DUCKDB_TYPE_DUCKDB_TYPE_UTINYINT => Self::UTinyint, 62 | DUCKDB_TYPE_DUCKDB_TYPE_USMALLINT => Self::USmallint, 63 | DUCKDB_TYPE_DUCKDB_TYPE_UINTEGER => Self::UInteger, 64 | DUCKDB_TYPE_DUCKDB_TYPE_UBIGINT => Self::UBigint, 65 | DUCKDB_TYPE_DUCKDB_TYPE_FLOAT => Self::Float, 66 | DUCKDB_TYPE_DUCKDB_TYPE_DOUBLE => Self::Double, 67 | DUCKDB_TYPE_DUCKDB_TYPE_VARCHAR => Self::Varchar, 68 | DUCKDB_TYPE_DUCKDB_TYPE_BLOB => Self::Blob, 69 | DUCKDB_TYPE_DUCKDB_TYPE_TIMESTAMP => Self::Timestamp, 70 | DUCKDB_TYPE_DUCKDB_TYPE_DATE => Self::Date, 71 | DUCKDB_TYPE_DUCKDB_TYPE_TIME => Self::Time, 72 | DUCKDB_TYPE_DUCKDB_TYPE_INTERVAL => Self::Interval, 73 | DUCKDB_TYPE_DUCKDB_TYPE_HUGEINT => Self::Hugeint, 74 | DUCKDB_TYPE_DUCKDB_TYPE_DECIMAL => Self::Decimal, 75 | DUCKDB_TYPE_DUCKDB_TYPE_TIMESTAMP_S => Self::TimestampS, 76 | DUCKDB_TYPE_DUCKDB_TYPE_TIMESTAMP_MS => Self::TimestampMs, 77 | DUCKDB_TYPE_DUCKDB_TYPE_TIMESTAMP_NS => Self::TimestampNs, 78 | DUCKDB_TYPE_DUCKDB_TYPE_ENUM => Self::Enum, 79 | DUCKDB_TYPE_DUCKDB_TYPE_LIST => Self::List, 80 | DUCKDB_TYPE_DUCKDB_TYPE_STRUCT => Self::Struct, 81 | DUCKDB_TYPE_DUCKDB_TYPE_MAP => Self::Map, 82 | DUCKDB_TYPE_DUCKDB_TYPE_UUID => Self::Uuid, 83 | DUCKDB_TYPE_DUCKDB_TYPE_UNION => Self::Union, 84 | _ => panic!(), 85 | } 86 | } 87 | } 88 | 89 | /// DuckDB Logical Type. 90 | /// 91 | /// https://duckdb.org/docs/sql/data_types/overview 92 | pub struct LogicalType { 93 | pub(crate) ptr: duckdb_logical_type, 94 | } 95 | 96 | impl Debug for LogicalType { 97 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { 98 | let id = self.id(); 99 | match id { 100 | LogicalTypeId::Struct => { 101 | write!(f, "struct<")?; 102 | for i in 0..self.num_children() { 103 | if i > 0 { 104 | write!(f, ", ")?; 105 | } 106 | write!(f, "{}: {:?}", self.child_name(i), self.child(i))?; 107 | } 108 | write!(f, ">") 109 | } 110 | _ => write!(f, "{:?}", self.id()), 111 | } 112 | } 113 | } 114 | 115 | impl Drop for LogicalType { 116 | fn drop(&mut self) { 117 | if !self.ptr.is_null() { 118 | unsafe { 119 | duckdb_destroy_logical_type(&mut self.ptr); 120 | } 121 | } 122 | 123 | self.ptr = std::ptr::null_mut(); 124 | } 125 | } 126 | 127 | /// Wrap a DuckDB logical type from C API 128 | impl From for LogicalType { 129 | fn from(ptr: duckdb_logical_type) -> Self { 130 | Self { ptr } 131 | } 132 | } 133 | 134 | impl LogicalType { 135 | /// Create a new [LogicalType] from [LogicalTypeId] 136 | pub fn new(id: LogicalTypeId) -> Self { 137 | unsafe { 138 | Self { 139 | ptr: duckdb_create_logical_type(id as u32), 140 | } 141 | } 142 | } 143 | 144 | /// Creates a list type from its child type. 145 | /// 146 | pub fn list_type(child_type: &LogicalType) -> Self { 147 | unsafe { 148 | Self { 149 | ptr: duckdb_create_list_type(child_type.ptr), 150 | } 151 | } 152 | } 153 | 154 | /// Make a `LogicalType` for `struct` 155 | /// 156 | pub fn struct_type(fields: &[(&str, LogicalType)]) -> Self { 157 | let keys: Vec = fields.iter().map(|f| CString::new(f.0).unwrap()).collect(); 158 | let mut values: Vec = fields.iter().map(|it| it.1.ptr).collect(); 159 | let name_ptrs = keys 160 | .iter() 161 | .map(|it| it.as_ptr()) 162 | .collect::>(); 163 | 164 | unsafe { 165 | Self { 166 | ptr: duckdb_create_struct_type( 167 | values.as_mut_slice().as_mut_ptr(), 168 | name_ptrs.as_slice().as_ptr().cast_mut(), 169 | fields.len() as idx_t, 170 | ), 171 | } 172 | } 173 | } 174 | 175 | /// Logical type ID 176 | pub fn id(&self) -> LogicalTypeId { 177 | let duckdb_type_id = unsafe { duckdb_get_type_id(self.ptr) }; 178 | duckdb_type_id.into() 179 | } 180 | 181 | pub fn num_children(&self) -> usize { 182 | match self.id() { 183 | LogicalTypeId::Struct => unsafe { duckdb_struct_type_child_count(self.ptr) as usize }, 184 | LogicalTypeId::List => 1, 185 | _ => 0, 186 | } 187 | } 188 | 189 | pub fn child_name(&self, idx: usize) -> String { 190 | assert_eq!(self.id(), LogicalTypeId::Struct); 191 | unsafe { 192 | let child_name_ptr = duckdb_struct_type_child_name(self.ptr, idx as u64); 193 | let c_str = CString::from_raw(child_name_ptr); 194 | let name = c_str.to_str().unwrap(); 195 | name.to_string() 196 | } 197 | } 198 | 199 | pub fn child(&self, idx: usize) -> Self { 200 | let c_logical_type = unsafe { duckdb_struct_type_child_type(self.ptr, idx as u64) }; 201 | Self::from(c_logical_type) 202 | } 203 | } 204 | -------------------------------------------------------------------------------- /duckdb_athena_rust/src/table_function.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2023 Lance Developers 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | use std::ffi::{c_void, CString}; 16 | 17 | use libduckdb_sys::{ 18 | duckdb_bind_add_result_column, duckdb_bind_get_parameter, duckdb_bind_get_parameter_count, 19 | duckdb_bind_get_named_parameter, 20 | duckdb_bind_info, duckdb_bind_set_bind_data, duckdb_bind_set_cardinality, 21 | duckdb_bind_set_error, duckdb_create_table_function, duckdb_delete_callback_t, 22 | duckdb_destroy_table_function, duckdb_init_get_bind_data, duckdb_init_get_column_count, 23 | duckdb_init_get_column_index, duckdb_init_info, duckdb_init_set_error, 24 | duckdb_init_set_init_data, duckdb_table_function, duckdb_table_function_add_named_parameter, 25 | duckdb_table_function_add_parameter, duckdb_table_function_bind_t, 26 | duckdb_table_function_init_t, duckdb_table_function_set_bind, 27 | duckdb_table_function_set_function, duckdb_table_function_set_init, 28 | duckdb_table_function_set_name, duckdb_table_function_supports_projection_pushdown, 29 | duckdb_table_function_t, 30 | }; 31 | use crate::{Error, LogicalType, Value}; 32 | 33 | /// DuckDB BindInfo. 34 | pub struct BindInfo { 35 | ptr: duckdb_bind_info, 36 | } 37 | 38 | impl From for BindInfo { 39 | fn from(ptr: duckdb_bind_info) -> Self { 40 | Self { ptr } 41 | } 42 | } 43 | 44 | impl BindInfo { 45 | /// Add a result column to the output of the table function. 46 | /// 47 | /// - `name`: The name of the column 48 | /// - `logical_type`: The [LogicalType] of the new column. 49 | /// 50 | /// # Safety 51 | pub fn add_result_column(&self, name: &str, logical_type: LogicalType) { 52 | let c_string = CString::new(name).unwrap(); 53 | unsafe { 54 | duckdb_bind_add_result_column(self.ptr, c_string.as_ptr(), logical_type.ptr); 55 | } 56 | } 57 | 58 | /// Sets the user-provided bind data in the bind object. This object can be retrieved again during execution. 59 | /// 60 | /// # Arguments 61 | /// * `extra_data`: The bind data object. 62 | /// * `destroy`: The callback that will be called to destroy the bind data (if any) 63 | /// 64 | /// # Safety 65 | /// 66 | pub fn set_bind_data( 67 | &self, 68 | data: *mut c_void, 69 | free_function: Option, 70 | ) { 71 | unsafe { 72 | duckdb_bind_set_bind_data(self.ptr, data, free_function); 73 | } 74 | } 75 | 76 | /// Get the number of regular (non-named) parameters to the function. 77 | pub fn num_parameters(&self) -> u64 { 78 | unsafe { duckdb_bind_get_parameter_count(self.ptr) } 79 | } 80 | 81 | /// Get the parameter at the given index. 82 | /// 83 | /// # Arguments 84 | /// * `index`: The index of the parameter to get 85 | /// 86 | /// returns: The value of the parameter 87 | pub fn parameter(&self, index: usize) -> Value { 88 | unsafe { Value::from(duckdb_bind_get_parameter(self.ptr, index as u64)) } 89 | } 90 | 91 | pub fn named_parameter(&self, name: &str) -> Value { 92 | let c_string = CString::new(name).unwrap(); 93 | unsafe { Value::from(duckdb_bind_get_named_parameter(self.ptr, c_string.as_ptr())) } 94 | } 95 | 96 | /// Sets the cardinality estimate for the table function, used for optimization. 97 | /// 98 | /// * `cardinality`: The cardinality estimate 99 | /// * `is_exact`: Whether or not the cardinality estimate is exact, or an approximation 100 | pub fn set_cardinality(&self, cardinality: usize, is_exact: bool) { 101 | unsafe { duckdb_bind_set_cardinality(self.ptr, cardinality as u64, is_exact) } 102 | } 103 | 104 | pub fn set_error(&self, error: Error) { 105 | unsafe { 106 | duckdb_bind_set_error(self.ptr, error.c_str().as_ptr()); 107 | } 108 | } 109 | } 110 | 111 | #[derive(Debug)] 112 | pub struct InitInfo { 113 | ptr: duckdb_init_info, 114 | } 115 | 116 | impl From for InitInfo { 117 | fn from(ptr: duckdb_init_info) -> Self { 118 | Self { ptr } 119 | } 120 | } 121 | 122 | impl InitInfo { 123 | /// # Safety 124 | pub fn set_init_data(&self, data: *mut c_void, freeer: duckdb_delete_callback_t) { 125 | unsafe { 126 | duckdb_init_set_init_data(self.ptr, data, freeer); 127 | } 128 | } 129 | 130 | pub fn bind_data(&self) -> *mut T { 131 | unsafe { duckdb_init_get_bind_data(self.ptr).cast() } 132 | } 133 | 134 | /// Report that an error has occurred while calling init. 135 | /// 136 | /// # Arguments 137 | /// * `error`: The error message 138 | pub fn set_error(&self, error: Error) { 139 | unsafe { duckdb_init_set_error(self.ptr, error.c_str().as_ptr()) } 140 | } 141 | 142 | /// Get the total number of columns to be projected. 143 | pub fn projected_column_ids(&self) -> Vec { 144 | let num_columns = unsafe { duckdb_init_get_column_count(self.ptr) as usize }; 145 | (0..num_columns) 146 | .map(|col_id| unsafe { duckdb_init_get_column_index(self.ptr, col_id as u64) as usize }) 147 | .collect() 148 | } 149 | } 150 | 151 | /// A function that returns a queryable table 152 | #[derive(Debug)] 153 | pub struct TableFunction { 154 | pub(crate) ptr: duckdb_table_function, 155 | } 156 | 157 | impl Drop for TableFunction { 158 | fn drop(&mut self) { 159 | if !self.ptr.is_null() { 160 | unsafe { 161 | duckdb_destroy_table_function(&mut self.ptr); 162 | } 163 | } 164 | self.ptr = std::ptr::null_mut(); 165 | } 166 | } 167 | 168 | impl TableFunction { 169 | /// Creates a new empty table function. 170 | pub fn new(name: &str) -> Self { 171 | let this = Self { 172 | ptr: unsafe { duckdb_create_table_function() }, 173 | }; 174 | this.set_name(name); 175 | this 176 | } 177 | 178 | pub fn set_name(&self, name: &str) -> &Self { 179 | unsafe { 180 | let string = CString::new(name).unwrap(); 181 | duckdb_table_function_set_name(self.ptr, string.as_ptr()); 182 | } 183 | self 184 | } 185 | 186 | /// Adds a parameter to the table function. 187 | /// 188 | pub fn add_parameter(&self, logical_type: &LogicalType) -> &Self { 189 | unsafe { 190 | duckdb_table_function_add_parameter(self.ptr, logical_type.ptr); 191 | } 192 | self 193 | } 194 | 195 | // Adds a named parameter to the table function. 196 | pub fn add_named_parameter(&self, name: &str, logical_type: &LogicalType) -> &Self { 197 | unsafe { 198 | let string = CString::new(name).unwrap(); 199 | duckdb_table_function_add_named_parameter(self.ptr, string.as_ptr(), logical_type.ptr); 200 | } 201 | self 202 | } 203 | 204 | /// Enable project pushdown. 205 | pub fn pushdown(&self, supports: bool) -> &Self { 206 | unsafe { 207 | duckdb_table_function_supports_projection_pushdown(self.ptr, supports); 208 | } 209 | self 210 | } 211 | 212 | /// Sets the main function of the table function 213 | /// 214 | pub fn set_function(&self, func: duckdb_table_function_t) -> &Self { 215 | unsafe { 216 | duckdb_table_function_set_function(self.ptr, func); 217 | } 218 | self 219 | } 220 | 221 | /// Sets the init function of the table function 222 | /// 223 | /// # Arguments 224 | /// * `function`: The init function 225 | pub fn set_init(&self, init_func: duckdb_table_function_init_t) -> &Self { 226 | unsafe { 227 | duckdb_table_function_set_init(self.ptr, init_func); 228 | } 229 | self 230 | } 231 | 232 | /// Sets the bind function of the table function 233 | /// 234 | /// # Arguments 235 | /// * `bind_func`: The bind function 236 | pub fn set_bind(&self, bind_func: duckdb_table_function_bind_t) -> &Self { 237 | unsafe { 238 | duckdb_table_function_set_bind(self.ptr, bind_func); 239 | } 240 | self 241 | } 242 | } 243 | -------------------------------------------------------------------------------- /duckdb_athena_rust/src/value.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2023 Lance Developers 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | use libduckdb_sys::{duckdb_destroy_value, duckdb_get_varchar, duckdb_value}; 16 | use std::ffi::CString; 17 | 18 | /// The Value object holds a single arbitrary value of any type that can be 19 | /// stored in the database. 20 | #[derive(Debug)] 21 | pub struct Value { 22 | pub(crate) ptr: duckdb_value, 23 | } 24 | 25 | impl From for Value { 26 | fn from(ptr: duckdb_value) -> Self { 27 | Self { ptr } 28 | } 29 | } 30 | 31 | impl Drop for Value { 32 | fn drop(&mut self) { 33 | if self.ptr.is_null() { 34 | unsafe { 35 | duckdb_destroy_value(&mut self.ptr); 36 | } 37 | } 38 | self.ptr = std::ptr::null_mut(); 39 | } 40 | } 41 | 42 | impl Value { 43 | pub fn to_string(&self) -> String { 44 | let c_string = unsafe { CString::from_raw(duckdb_get_varchar(self.ptr)) }; 45 | c_string.into_string().unwrap() 46 | } 47 | 48 | pub fn is_null(&self) -> bool { 49 | return self.ptr.is_null(); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /duckdb_athena_rust/src/vector.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2023 Lance Developers 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | use std::any::Any; 16 | use std::ffi::CString; 17 | use std::slice; 18 | 19 | use libduckdb_sys::{ 20 | duckdb_list_entry, duckdb_list_vector_get_child, duckdb_list_vector_get_size, 21 | duckdb_list_vector_reserve, duckdb_list_vector_set_size, duckdb_struct_type_child_count, 22 | duckdb_struct_type_child_name, duckdb_struct_vector_get_child, duckdb_vector, 23 | duckdb_vector_assign_string_element, duckdb_vector_get_column_type, duckdb_vector_get_data, 24 | duckdb_vector_size, 25 | }; 26 | use crate::LogicalType; 27 | 28 | /// Vector trait. 29 | pub trait Vector { 30 | fn as_any(&self) -> &dyn Any; 31 | 32 | fn as_mut_any(&mut self) -> &mut dyn Any; 33 | } 34 | 35 | pub struct FlatVector { 36 | ptr: duckdb_vector, 37 | capacity: usize, 38 | } 39 | 40 | impl From for FlatVector { 41 | fn from(ptr: duckdb_vector) -> Self { 42 | Self { 43 | ptr, 44 | capacity: unsafe { duckdb_vector_size() as usize }, 45 | } 46 | } 47 | } 48 | 49 | impl Vector for FlatVector { 50 | fn as_any(&self) -> &dyn Any { 51 | self 52 | } 53 | 54 | fn as_mut_any(&mut self) -> &mut dyn Any { 55 | self 56 | } 57 | } 58 | 59 | impl FlatVector { 60 | fn with_capacity(ptr: duckdb_vector, capacity: usize) -> Self { 61 | Self { ptr, capacity } 62 | } 63 | 64 | pub fn capacity(&self) -> usize { 65 | self.capacity 66 | } 67 | 68 | /// Returns an unsafe mutable pointer to the vector’s 69 | pub fn as_mut_ptr(&self) -> *mut T { 70 | unsafe { duckdb_vector_get_data(self.ptr).cast() } 71 | } 72 | 73 | pub fn as_slice(&self) -> &[T] { 74 | unsafe { slice::from_raw_parts(self.as_mut_ptr(), self.capacity()) } 75 | } 76 | 77 | pub fn as_mut_slice(&mut self) -> &mut [T] { 78 | unsafe { slice::from_raw_parts_mut(self.as_mut_ptr(), self.capacity()) } 79 | } 80 | 81 | pub fn logical_type(&self) -> LogicalType { 82 | LogicalType::from(unsafe { duckdb_vector_get_column_type(self.ptr) }) 83 | } 84 | 85 | pub fn copy(&mut self, data: &[T]) { 86 | assert!(data.len() <= self.capacity()); 87 | self.as_mut_slice::()[0..data.len()].copy_from_slice(data); 88 | } 89 | } 90 | 91 | pub trait Inserter { 92 | fn insert(&self, index: usize, value: T); 93 | } 94 | 95 | impl Inserter<&str> for FlatVector { 96 | fn insert(&self, index: usize, value: &str) { 97 | let cstr = CString::new(value.as_bytes()).unwrap(); 98 | unsafe { 99 | duckdb_vector_assign_string_element(self.ptr, index as u64, cstr.as_ptr()); 100 | } 101 | } 102 | } 103 | 104 | pub struct ListVector { 105 | /// ListVector does not own the vector pointer. 106 | entries: FlatVector, 107 | } 108 | 109 | impl From for ListVector { 110 | fn from(ptr: duckdb_vector) -> Self { 111 | Self { 112 | entries: FlatVector::from(ptr), 113 | } 114 | } 115 | } 116 | 117 | impl ListVector { 118 | pub fn len(&self) -> usize { 119 | unsafe { duckdb_list_vector_get_size(self.entries.ptr) as usize } 120 | } 121 | 122 | pub fn is_empty(&self) -> bool { 123 | self.len() == 0 124 | } 125 | 126 | // TODO: not ideal interface. Where should we keep capacity. 127 | pub fn child(&self, capacity: usize) -> FlatVector { 128 | self.reserve(capacity); 129 | FlatVector::with_capacity( 130 | unsafe { duckdb_list_vector_get_child(self.entries.ptr) }, 131 | capacity, 132 | ) 133 | } 134 | 135 | /// Set primitive data to the child node. 136 | pub fn set_child(&self, data: &[T]) { 137 | self.child(data.len()).copy(data); 138 | self.set_len(data.len()); 139 | } 140 | 141 | pub fn set_entry(&mut self, idx: usize, offset: usize, length: usize) { 142 | self.entries.as_mut_slice::()[idx].offset = offset as u64; 143 | self.entries.as_mut_slice::()[idx].length = length as u64; 144 | } 145 | 146 | /// Reserve the capacity for its child node. 147 | fn reserve(&self, capacity: usize) { 148 | unsafe { duckdb_list_vector_reserve(self.entries.ptr, capacity as u64); } 149 | } 150 | 151 | pub fn set_len(&self, new_len: usize) { 152 | unsafe { duckdb_list_vector_set_size(self.entries.ptr, new_len as u64); } 153 | } 154 | } 155 | 156 | pub struct StructVector { 157 | /// ListVector does not own the vector pointer. 158 | ptr: duckdb_vector, 159 | } 160 | 161 | impl From for StructVector { 162 | fn from(ptr: duckdb_vector) -> Self { 163 | Self { ptr } 164 | } 165 | } 166 | 167 | impl StructVector { 168 | pub fn child(&self, idx: usize) -> FlatVector { 169 | FlatVector::from(unsafe { duckdb_struct_vector_get_child(self.ptr, idx as u64) }) 170 | } 171 | 172 | /// Take the child as [StructVector]. 173 | pub fn struct_vector_child(&self, idx: usize) -> StructVector { 174 | Self::from(unsafe { duckdb_struct_vector_get_child(self.ptr, idx as u64) }) 175 | } 176 | 177 | pub fn list_vector_child(&self, idx: usize) -> ListVector { 178 | ListVector::from(unsafe { duckdb_struct_vector_get_child(self.ptr, idx as u64) }) 179 | } 180 | 181 | /// Get the logical type of this struct vector. 182 | pub fn logical_type(&self) -> LogicalType { 183 | LogicalType::from(unsafe { duckdb_vector_get_column_type(self.ptr) }) 184 | } 185 | 186 | pub fn child_name(&self, idx: usize) -> String { 187 | let logical_type = self.logical_type(); 188 | unsafe { 189 | let child_name_ptr = duckdb_struct_type_child_name(logical_type.ptr, idx as u64); 190 | let c_str = CString::from_raw(child_name_ptr); 191 | let name = c_str.to_str().unwrap(); 192 | // duckdb_free(child_name_ptr.cast()); 193 | name.to_string() 194 | } 195 | } 196 | 197 | pub fn num_children(&self) -> usize { 198 | let logical_type = self.logical_type(); 199 | unsafe { duckdb_struct_type_child_count(logical_type.ptr) as usize } 200 | } 201 | } 202 | -------------------------------------------------------------------------------- /extension_config.cmake: -------------------------------------------------------------------------------- 1 | # This file is included by DuckDB's build system. It specifies which extension to load 2 | 3 | # Extension from this repo 4 | duckdb_extension_load(athena 5 | SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR} 6 | LOAD_TESTS 7 | LINKED_LIBS "${CMAKE_CURRENT_BINARY_DIR}/libduckdb_athena.a" 8 | ) 9 | 10 | # Any extra extensions that should be built 11 | # e.g.: duckdb_extension_load(json) 12 | -------------------------------------------------------------------------------- /scripts/extension-upload.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Usage: ./extension-upload.sh 4 | # : Name of the extension 5 | # : Version (commit / version tag) of the extension 6 | # : Version (commit / version tag) of DuckDB 7 | # : Architecture target of the extension binary 8 | # : S3 bucket to upload to 9 | # : Set this as the latest version ("true" / "false", default: "false") 10 | 11 | set -e 12 | 13 | ext="build/release/extension/duckdb-athena-extension/$1.duckdb_extension" 14 | 15 | # compress extension binary 16 | gzip < $ext > "$1.duckdb_extension.gz" 17 | 18 | # upload compressed extension binary to S3 19 | echo "Uploading extension binary to s3://$5/artifacts/$1/$2/$3/$4/$1.duckdb_extension.gz" 20 | aws s3 cp $1.duckdb_extension.gz s3://$5/artifacts/$1/$2/$3/$4/$1.duckdb_extension.gz 21 | 22 | if [ $6 = 'true' ] 23 | then 24 | echo "Also copying to latest" 25 | aws s3 cp $1.duckdb_extension.gz s3://$5/artifacts/$1/latest/$3/$4/$1.duckdb_extension.gz 26 | fi 27 | # also uplo -------------------------------------------------------------------------------- /src/athena_extension.cpp: -------------------------------------------------------------------------------- 1 | #define DUCKDB_EXTENSION_MAIN 2 | #include "athena_extension.hpp" 3 | 4 | // Include the declarations of things from Rust. 5 | #include "rust.h" 6 | 7 | namespace duckdb 8 | { 9 | 10 | void AthenaExtension::Load(DuckDB &db) 11 | { 12 | // Call the Rust function to initialize the extension. 13 | athena_init(&db); 14 | } 15 | 16 | std::string AthenaExtension::Name() 17 | { 18 | return "athena"; 19 | } 20 | 21 | } // namespace duckdb 22 | 23 | #ifndef DUCKDB_EXTENSION_MAIN 24 | #error DUCKDB_EXTENSION_MAIN not defined 25 | #endif 26 | -------------------------------------------------------------------------------- /src/error.rs: -------------------------------------------------------------------------------- 1 | // Copyright 2023 Lance Developers 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | use duckdb_athena_rust; 16 | 17 | #[derive(Debug)] 18 | pub enum Error { 19 | DuckDB(String), 20 | } 21 | 22 | impl std::fmt::Display for Error { 23 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 24 | let (catalog, message) = match self { 25 | Self::DuckDB(s) => ("DuckDB", s.as_str()), 26 | }; 27 | write!(f, "Lance({catalog}): {message}") 28 | } 29 | } 30 | 31 | pub type Result = std::result::Result; 32 | 33 | // TODO: contribute to upstream (duckdb_extension) to have a Error impl. 34 | impl From> for Error { 35 | fn from(value: Box) -> Self { 36 | Self::DuckDB(value.to_string()) 37 | } 38 | } 39 | 40 | impl From for duckdb_athena_rust::Error { 41 | fn from(e: Error) -> Self { 42 | Self::DuckDB(e.to_string()) 43 | } 44 | } 45 | 46 | impl From for Error { 47 | fn from(e: duckdb_athena_rust::Error) -> Self { 48 | Self::DuckDB(e.to_string()) 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/include/athena_extension.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "duckdb.hpp" 4 | 5 | namespace duckdb 6 | { 7 | 8 | class AthenaExtension : public Extension 9 | { 10 | public: 11 | void Load(DuckDB &db) override; 12 | std::string Name() override; 13 | }; 14 | 15 | } // namespace duckdb 16 | -------------------------------------------------------------------------------- /src/include/rust.h: -------------------------------------------------------------------------------- 1 | 2 | extern "C" 3 | { 4 | void athena_init(void *db); 5 | void athena_version(void); 6 | } // extern "C" 7 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | #![allow(dead_code)] 2 | use duckdb_athena_rust::Database; 3 | use std::ffi::c_char; 4 | use tokio::runtime::Runtime; 5 | 6 | pub mod error; 7 | mod table_function; 8 | mod types; 9 | 10 | use crate::table_function::build_table_function_def; 11 | use duckdb_athena_rust::{_duckdb_database, duckdb_library_version}; 12 | use error::Result; 13 | 14 | lazy_static::lazy_static! { 15 | static ref RUNTIME: Runtime = tokio::runtime::Runtime::new() 16 | .expect("Creating Tokio runtime"); 17 | } 18 | 19 | /// Init hook for DuckDB, registers all functionality provided by this extension 20 | /// # Safety 21 | /// . 22 | #[no_mangle] 23 | pub unsafe extern "C" fn athena_init(db: *mut _duckdb_database) { 24 | init(db).expect("init failed"); 25 | } 26 | 27 | unsafe fn init(db: *mut _duckdb_database) -> Result<()> { 28 | let db = Database::from(db); 29 | let table_function = build_table_function_def(); 30 | let connection = db.connect()?; 31 | connection.register_table_function(table_function)?; 32 | Ok(()) 33 | } 34 | 35 | /// Version hook for DuckDB, indicates which version of DuckDB this extension was compiled against 36 | #[no_mangle] 37 | pub extern "C" fn athena_version() -> *const c_char { 38 | unsafe { duckdb_library_version() } 39 | } 40 | -------------------------------------------------------------------------------- /src/table_function.rs: -------------------------------------------------------------------------------- 1 | use anyhow::{anyhow, Result}; 2 | use aws_sdk_athena::model::ResultSetMetadata; 3 | use aws_sdk_athena::types::SdkError; 4 | use aws_sdk_athena::{error::GetQueryResultsError, model::Row}; 5 | use aws_sdk_glue::model::Logical; 6 | use futures::{executor::block_on, Stream}; 7 | use std::os::fd::IntoRawFd; 8 | use std::ptr::null; 9 | use std::{ 10 | ffi::{c_void, CStr, CString}, 11 | os::raw::c_char, 12 | pin::Pin, 13 | task::{Context, Poll}, 14 | thread, 15 | }; 16 | 17 | use aws_sdk_athena::{ 18 | model::{ 19 | QueryExecutionState::{self, *}, 20 | ResultConfiguration, ResultSet, 21 | }, 22 | output::{GetQueryExecutionOutput, GetQueryResultsOutput}, 23 | paginator::GetQueryResultsPaginator, 24 | Client as AthenaClient, 25 | }; 26 | use aws_sdk_glue::Client as GlueClient; 27 | use duckdb_athena_rust::table_function::{BindInfo, InitInfo, TableFunction}; 28 | use duckdb_athena_rust::{ 29 | duckdb_bind_info, duckdb_data_chunk, duckdb_free, duckdb_function_info, duckdb_init_info, 30 | malloc_struct, 31 | }; 32 | use duckdb_athena_rust::{DataChunk, FunctionInfo, LogicalType, LogicalTypeId}; 33 | 34 | use tokio::{runtime::Runtime, time::Duration}; 35 | 36 | use crate::types::{map_type, populate_column}; 37 | 38 | #[repr(C)] 39 | struct ScanBindData { 40 | /// Athena table name and query result output location 41 | tablename: *mut c_char, 42 | output_location: *mut c_char, 43 | limit: i32, 44 | } 45 | 46 | const DEFAULT_LIMIT: i32 = 10000; 47 | 48 | impl ScanBindData { 49 | fn new(tablename: &str, output_location: &str) -> Self { 50 | Self { 51 | tablename: CString::new(tablename).expect("Table name").into_raw(), 52 | output_location: CString::new(output_location) 53 | .expect("S3 output location") 54 | .into_raw(), 55 | limit: DEFAULT_LIMIT as i32, 56 | } 57 | } 58 | } 59 | 60 | /// Drop the ScanBindData from C. 61 | /// 62 | /// # Safety 63 | unsafe extern "C" fn drop_scan_bind_data_c(v: *mut c_void) { 64 | let actual = v.cast::(); 65 | drop(CString::from_raw((*actual).tablename.cast())); 66 | drop(CString::from_raw((*actual).output_location.cast())); 67 | drop((*actual).limit); 68 | duckdb_free(v); 69 | } 70 | 71 | struct ResultStream { 72 | stream: 73 | Pin>>>>, 74 | } 75 | 76 | impl ResultStream { 77 | pub fn new( 78 | stream: Box< 79 | dyn Stream>>, 80 | >, 81 | ) -> Self { 82 | Self { 83 | stream: stream.into(), 84 | } 85 | } 86 | } 87 | 88 | impl Stream for ResultStream { 89 | type Item = Result>; 90 | 91 | // https://stackoverflow.com/questions/72926989/how-to-implement-trait-futuresstreamstream was ridiculously helpful 92 | fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { 93 | match self.get_mut().stream.as_mut().poll_next(cx) { 94 | Poll::Pending => Poll::Pending, 95 | Poll::Ready(v) => { 96 | // Do what you need to do with v here. 97 | Poll::Ready(v) 98 | } 99 | } 100 | } 101 | } 102 | #[repr(C)] 103 | struct ScanInitData { 104 | stream: *mut ResultStream, 105 | pagination_index: u32, 106 | done: bool, 107 | } 108 | 109 | impl ScanInitData { 110 | fn new(stream: Box) -> Self { 111 | Self { 112 | stream: Box::into_raw(stream), 113 | done: false, 114 | pagination_index: 0, 115 | } 116 | } 117 | } 118 | 119 | /// # Safety 120 | /// 121 | /// . 122 | #[no_mangle] 123 | unsafe extern "C" fn read_athena(info: duckdb_function_info, output: duckdb_data_chunk) { 124 | let info = FunctionInfo::from(info); 125 | let mut output = DataChunk::from(output); 126 | 127 | let init_data = info.init_data::(); 128 | // if (*init_data).done { 129 | // output.set_len(0); 130 | // return; 131 | // } 132 | 133 | let batch = match crate::RUNTIME 134 | .block_on(async { futures::StreamExt::next(&mut (*(*init_data).stream).stream).await }) 135 | { 136 | Some(Ok(b)) => Some(b), 137 | Some(Err(e)) => { 138 | info.set_error(duckdb_athena_rust::Error::DuckDB(e.to_string())); 139 | return; 140 | } 141 | None => None, 142 | }; 143 | 144 | if let Some(b) = batch { 145 | let mut rows = b.result_set().unwrap().rows().unwrap(); 146 | // Athena returns the header in the results 0_o but only in the first page 147 | if (*init_data).pagination_index == 0 { 148 | rows = &rows[1..]; 149 | } 150 | let metadata = b.result_set().unwrap().result_set_metadata().unwrap(); 151 | result_set_to_duckdb_data_chunk(rows, metadata, &mut output) 152 | .expect("Couldn't write results"); 153 | } else { 154 | (*init_data).done = true; 155 | output.set_len(0); 156 | } 157 | 158 | (*init_data).pagination_index += 1; 159 | } 160 | 161 | pub fn result_set_to_duckdb_data_chunk( 162 | rows: &[Row], 163 | metadata: &ResultSetMetadata, 164 | chunk: &DataChunk, 165 | ) -> Result<()> { 166 | // Fill the row 167 | // This is asserting the wrong thing (row length vs. column length) 168 | // assert!_eq!(rs.rows().unwrap().len(), chunk.num_columns()); 169 | // let rows = &rs.rows().unwrap()[1..]; 170 | let result_size = rows.len(); 171 | 172 | for row_idx in 0..result_size { 173 | let row = &rows[row_idx]; 174 | let row_data = row.data().unwrap(); 175 | for col_idx in 0..row_data.len() { 176 | let value = row_data[col_idx].var_char_value().unwrap(); 177 | let colinfo = &metadata.column_info().unwrap()[col_idx]; 178 | let ddb_type = map_type(colinfo.r#type().unwrap().to_string()).unwrap(); 179 | unsafe { populate_column(value, ddb_type, chunk, row_idx, col_idx) }; 180 | } 181 | } 182 | 183 | chunk.set_len(result_size); 184 | 185 | Ok(()) 186 | } 187 | 188 | fn status(resp: &GetQueryExecutionOutput) -> Option<&QueryExecutionState> { 189 | resp.query_execution().unwrap().status().unwrap().state() 190 | } 191 | 192 | fn total_execution_time(resp: &GetQueryExecutionOutput) -> Option { 193 | resp.query_execution() 194 | .unwrap() 195 | .statistics() 196 | .unwrap() 197 | .total_execution_time_in_millis() 198 | } 199 | 200 | async fn get_query_result(client: &AthenaClient, query_execution_id: String) -> Result { 201 | let resp = anyhow::Context::with_context( 202 | client 203 | .get_query_results() 204 | .set_query_execution_id(Some(query_execution_id.clone())) 205 | .send() 206 | .await, 207 | || { 208 | format!( 209 | "could not get query results for query id {}", 210 | query_execution_id 211 | ) 212 | }, 213 | )?; 214 | 215 | Ok(resp 216 | .result_set() 217 | .ok_or_else(|| anyhow!("could not get query result"))? 218 | .clone()) 219 | } 220 | 221 | async fn get_query_result_paginator( 222 | client: &AthenaClient, 223 | query_execution_id: String, 224 | ) -> GetQueryResultsPaginator { 225 | client 226 | .get_query_results() 227 | .set_query_execution_id(Some(query_execution_id.clone())) 228 | .into_paginator() 229 | } 230 | 231 | /// # Safety 232 | /// 233 | /// . 234 | #[no_mangle] 235 | unsafe extern "C" fn read_athena_bind(bind_info: duckdb_bind_info) { 236 | let bind_info = BindInfo::from(bind_info); 237 | assert!(bind_info.num_parameters()>= 2); 238 | 239 | let tablename = bind_info.parameter(0); 240 | let output_location = bind_info.parameter(1); 241 | let maxrows = bind_info.named_parameter("maxrows"); 242 | // let maxrowsd = bind_info.named_parameter("maxrowsd"); 243 | // println!("Maxrowsd is: {:?}", maxrowsd); 244 | 245 | // How oh how to get named parameters? I don't know! 246 | // But postgres does https://github.com/duckdblabs/postgres_scanner/blob/main/postgres_scanner.cpp#LL1059C18-L1059C23 247 | 248 | // Table name is the first param that's getting passed in 249 | // We need to go to the Glue Data Catalog and fetch the column tables for that table. 250 | // For now, we only support the `default` table. 251 | let config = block_on(aws_config::load_from_env()); 252 | let client = GlueClient::new(&config); 253 | 254 | let table = client 255 | .get_table() 256 | .database_name("default") 257 | .name(tablename.to_string()) 258 | .send(); 259 | 260 | match crate::RUNTIME.block_on(table) { 261 | Ok(resp) => { 262 | let columns = resp 263 | .table() 264 | .unwrap() 265 | .storage_descriptor() 266 | .unwrap() 267 | .columns(); 268 | for column in columns.unwrap() { 269 | let typ = LogicalType::new( 270 | map_type(column.r#type().unwrap_or("varchar").to_string()) 271 | .expect("Could not get type"), 272 | ); 273 | bind_info.add_result_column(column.name().unwrap(), typ); 274 | } 275 | } 276 | Err(err) => { 277 | bind_info.set_error(duckdb_athena_rust::Error::DuckDB( 278 | err.into_service_error().to_string(), 279 | )); 280 | return; 281 | } 282 | } 283 | 284 | unsafe { 285 | let bind_data = malloc_struct::(); 286 | (*bind_data).tablename = CString::new(tablename.to_string()) 287 | .expect("Table name") 288 | .into_raw(); 289 | (*bind_data).output_location = CString::new(output_location.to_string()) 290 | .expect("S3 output location") 291 | .into_raw(); 292 | 293 | if !maxrows.is_null() { 294 | let lv = maxrows.to_string().parse::().unwrap(); 295 | (*bind_data).limit = lv; 296 | } else { 297 | (*bind_data).limit = DEFAULT_LIMIT; 298 | } 299 | 300 | bind_info.set_bind_data(bind_data.cast(), Some(drop_scan_bind_data_c)); 301 | } 302 | } 303 | 304 | /// # Safety 305 | /// 306 | /// . 307 | /// Creates the initial Athena query and waits for it to be done. 308 | #[no_mangle] 309 | unsafe extern "C" fn read_athena_init(info: duckdb_init_info) { 310 | let info = InitInfo::from(info); 311 | let bind_info = info.bind_data::(); 312 | // assert_eq!(bind_info.num_parameters(), 2); 313 | 314 | // Extract the table name and output location from 315 | let tablename = CStr::from_ptr((*bind_info).tablename).to_str().unwrap(); 316 | let output_location = CStr::from_ptr((*bind_info).output_location) 317 | .to_str() 318 | .unwrap(); 319 | let maxrows = (*bind_info).limit; 320 | 321 | let config = block_on(aws_config::load_from_env()); 322 | let client = AthenaClient::new(&config); 323 | let result_config = ResultConfiguration::builder() 324 | .set_output_location(Some(output_location.to_owned())) 325 | .build(); 326 | 327 | let mut query = format!("SELECT * FROM {}", tablename); 328 | if maxrows >= 0 { 329 | query = format!("{} LIMIT {}", query, maxrows); 330 | } 331 | 332 | let athena_query = client 333 | .start_query_execution() 334 | .set_query_string(Some(query)) 335 | .set_result_configuration(Some(result_config)) 336 | .set_work_group(Some("primary".to_string())) 337 | .send(); 338 | 339 | // TODO: Use unwrap_or maybe? Docs recommend not to use this because it can panic. 340 | let resp = crate::RUNTIME 341 | .block_on(athena_query) 342 | .expect("could not start query"); 343 | 344 | let query_execution_id = resp.query_execution_id().unwrap_or_default(); 345 | println!( 346 | "Running Athena query, execution id: {}", 347 | &query_execution_id 348 | ); 349 | 350 | let mut state: QueryExecutionState; 351 | 352 | loop { 353 | let get_query = client 354 | .get_query_execution() 355 | .set_query_execution_id(Some(query_execution_id.to_string())) 356 | .send(); 357 | 358 | let resp = crate::RUNTIME 359 | .block_on(get_query) 360 | .expect("Could not get query status"); 361 | state = status(&resp).expect("could not get query status").clone(); 362 | 363 | match state { 364 | Queued | Running => { 365 | thread::sleep(Duration::from_secs(5)); 366 | println!("State: {:?}, sleep 5 secs ...", state); 367 | } 368 | Cancelled | Failed => { 369 | println!("State: {:?}", state); 370 | 371 | match crate::RUNTIME 372 | .block_on(get_query_result(&client, query_execution_id.to_string())) 373 | { 374 | Ok(result) => println!("Result: {:?}", result), 375 | Err(e) => println!("Result error: {:?}", e), 376 | } 377 | 378 | break; 379 | } 380 | _ => { 381 | let millis = total_execution_time(&resp).unwrap(); 382 | println!("Total execution time: {} millis", millis); 383 | 384 | // let stream = match crate::RUNTIME.block_on(async { 385 | // let paginator = get_query_result_paginator(&client, query_execution_id.to_string()).await; 386 | // let results = paginator.send(); 387 | // results 388 | // }) { 389 | // Ok(s) => Box::new(s), 390 | // }; 391 | let paginator = crate::RUNTIME.block_on(async { 392 | get_query_result_paginator(&client, query_execution_id.to_string()).await 393 | }); 394 | let stream = paginator.send(); 395 | 396 | let init_data = Box::new(ScanInitData::new(Box::new(ResultStream::new(Box::new( 397 | stream, 398 | ))))); 399 | info.set_init_data(Box::into_raw(init_data).cast(), Some(duckdb_free)); 400 | break; 401 | } 402 | } 403 | } 404 | } 405 | 406 | pub fn build_table_function_def() -> TableFunction { 407 | let table_function = TableFunction::new("athena_scan"); 408 | let logical_type = LogicalType::new(LogicalTypeId::Varchar); 409 | let int_type = LogicalType::new(LogicalTypeId::Integer); 410 | table_function.add_parameter(&logical_type); 411 | table_function.add_parameter(&logical_type); 412 | // table_function.add_parameter(&int_type); 413 | // For some reason, we can't use limit here... 414 | table_function.add_named_parameter("maxrows", &int_type); 415 | 416 | table_function.set_function(Some(read_athena)); 417 | table_function.set_init(Some(read_athena_init)); 418 | table_function.set_bind(Some(read_athena_bind)); 419 | table_function 420 | } 421 | 422 | lazy_static::lazy_static! { 423 | static ref RUNTIME: Runtime = tokio::runtime::Builder::new_current_thread() 424 | .build() 425 | .expect("runtime"); 426 | } 427 | -------------------------------------------------------------------------------- /src/types.rs: -------------------------------------------------------------------------------- 1 | use std::{ffi::CString, slice}; 2 | 3 | use duckdb_athena_rust::duckdb_vector_size; 4 | use duckdb_athena_rust::{DataChunk, Inserter, LogicalTypeId}; 5 | 6 | use crate::error::{Error, Result}; 7 | 8 | // Maps Athena data types to DuckDB types 9 | // Supported types are listed here: https://docs.aws.amazon.com/athena/latest/ug/data-types.html 10 | pub fn map_type(col_type: String) -> Result { 11 | let type_id = match col_type.as_str() { 12 | "boolean" => LogicalTypeId::Boolean, 13 | "tinyint" => LogicalTypeId::Tinyint, 14 | "smallint" => LogicalTypeId::Smallint, 15 | "int" | "integer" => LogicalTypeId::Integer, 16 | "bigint" => LogicalTypeId::Bigint, 17 | "double" => LogicalTypeId::Double, 18 | "float" => LogicalTypeId::Float, 19 | "decimal" => LogicalTypeId::Decimal, 20 | "string" | "varchar" | "char" => LogicalTypeId::Varchar, 21 | "date" => LogicalTypeId::Date, 22 | "timestamp" => LogicalTypeId::Timestamp, 23 | _ => { 24 | return Err(Error::DuckDB(format!("Unsupported data type: {col_type}"))); 25 | } 26 | }; 27 | 28 | Ok(type_id) 29 | } 30 | 31 | pub unsafe fn populate_column( 32 | value: &str, 33 | col_type: LogicalTypeId, 34 | output: &DataChunk, 35 | row_idx: usize, 36 | col_idx: usize, 37 | ) { 38 | match col_type { 39 | LogicalTypeId::Varchar => set_bytes(output, row_idx, col_idx, value.as_bytes()), 40 | LogicalTypeId::Bigint => { 41 | let cvalue = value.parse::(); 42 | assign(output, row_idx, col_idx, cvalue) 43 | } 44 | LogicalTypeId::Integer => { 45 | let cvalue = value.parse::(); 46 | assign(output, row_idx, col_idx, cvalue) 47 | } 48 | _ => { 49 | println!("Unsupported data type: {:?}", col_type); 50 | } 51 | } 52 | } 53 | 54 | unsafe fn assign(output: &DataChunk, row_idx: usize, col_idx: usize, v: T) { 55 | get_column_result_vector::(output, col_idx)[row_idx] = v; 56 | } 57 | 58 | unsafe fn get_column_result_vector(output: &DataChunk, column_index: usize) -> &'static mut [T] { 59 | let result_vector = output.flat_vector(column_index); 60 | // result_vector.as_mut_slice::() or similar _should_ work here 61 | let ptr = result_vector.as_mut_ptr::(); 62 | slice::from_raw_parts_mut(ptr, duckdb_vector_size() as usize) 63 | } 64 | 65 | unsafe fn set_bytes(output: &DataChunk, row_idx: usize, col_idx: usize, bytes: &[u8]) { 66 | let cs = CString::new(bytes).unwrap(); 67 | let result_vector = &mut output.flat_vector(col_idx); 68 | result_vector.insert(row_idx, cs.to_str().unwrap()); 69 | } 70 | --------------------------------------------------------------------------------