feat: handle JSONB literals in Lance SQL planner #17072
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Rust | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - release/** | |
| pull_request: | |
| branches: | |
| - main | |
| - release/** | |
| paths: | |
| - rust/** | |
| - protos/** | |
| - .github/workflows/rust.yml | |
| - rust-toolchain.toml | |
| - Cargo.toml | |
| - Cargo.lock | |
| - deny.toml | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| # This env var is used by Swatinem/rust-cache@v2 for the cache | |
| # key, so we set it to make sure it is always consistent. | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: "1" | |
| jobs: | |
| format: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| components: rustfmt | |
| - name: Check formatting | |
| run: cargo fmt -- --check | |
| rustdoc: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install -y protobuf-compiler libssl-dev | |
| - name: Check documentation | |
| run: RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps | |
| clippy: | |
| permissions: | |
| checks: write | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install -y protobuf-compiler libssl-dev | |
| - name: Get features | |
| run: | | |
| ALL_FEATURES=`cargo metadata --format-version=1 --no-deps | jq -r '.packages[] | .features | keys | .[]' | sort | uniq | paste -s -d "," -` | |
| echo "ALL_FEATURES=${ALL_FEATURES}" >> $GITHUB_ENV | |
| - name: Clippy | |
| run: cargo clippy --profile ci --locked --features ${{ env.ALL_FEATURES }} --all-targets -- -D warnings | |
| cargo-deny: | |
| name: Check Rust dependencies (cargo-deny) | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: EmbarkStudios/cargo-deny-action@v2 | |
| with: | |
| log-level: warn | |
| command: check | |
| linux-build: | |
| runs-on: "warp-ubuntu-latest-x64-4x" | |
| timeout-minutes: 60 | |
| env: | |
| # Need up-to-date compilers for kernels | |
| CC: clang | |
| CXX: clang++ | |
| # Treat warnings as errors to catch issues early | |
| RUSTFLAGS: "-D warnings" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # pin the toolchain version to avoid surprises | |
| - name: Setup rust toolchain | |
| run: | | |
| rustup toolchain install nightly | |
| rustup default nightly | |
| - uses: rui314/setup-mold@v1 | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install -y protobuf-compiler libssl-dev | |
| - name: Start DynamodDB and S3 | |
| run: docker compose -f docker-compose.yml up -d --wait | |
| - name: Install cargo-llvm-cov | |
| uses: taiki-e/install-action@cargo-llvm-cov | |
| - name: Run tests | |
| run: | | |
| ALL_FEATURES=`cargo metadata --format-version=1 --no-deps | jq -r '.packages[] | .features | keys | .[]' | grep -v -e protoc -e slow_tests | sort | uniq | paste -s -d "," -` | |
| cargo +nightly llvm-cov --profile ci --locked --workspace --codecov --output-path coverage.codecov --features ${ALL_FEATURES} | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| codecov_yml_path: codecov.yml | |
| files: coverage.codecov | |
| flags: unittests | |
| fail_ci_if_error: false | |
| linux-arm: | |
| runs-on: warp-ubuntu-latest-arm64-4x | |
| timeout-minutes: 75 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup rust toolchain | |
| run: | | |
| rustup toolchain install stable | |
| rustup default stable | |
| - uses: rui314/setup-mold@v1 | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt -y -qq update | |
| sudo apt install -y protobuf-compiler libssl-dev pkg-config | |
| - name: Build tests | |
| run: | | |
| ALL_FEATURES=`cargo metadata --format-version=1 --no-deps | jq -r '.packages[] | .features | keys | .[]' | grep -v -e protoc -e slow_tests | sort | uniq | paste -s -d "," -` | |
| cargo test --profile ci --locked --features ${ALL_FEATURES} --no-run | |
| - name: Start DynamodDB and S3 | |
| run: docker compose -f docker-compose.yml up -d --wait | |
| - name: Run tests | |
| run: | | |
| ALL_FEATURES=`cargo metadata --format-version=1 --no-deps | jq -r '.packages[] | .features | keys | .[]' | grep -v -e protoc -e slow_tests | sort | uniq | paste -s -d "," -` | |
| cargo test --profile ci --locked --features ${ALL_FEATURES} | |
| query-integration-tests: | |
| runs-on: warp-ubuntu-latest-x64-4x | |
| timeout-minutes: 75 | |
| env: | |
| # We use opt-level 1 which makes some tests 5x faster to run. | |
| RUSTFLAGS: "-C debuginfo=1 -C opt-level=1" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup rust toolchain | |
| run: | | |
| rustup toolchain install stable | |
| rustup default stable | |
| - uses: rui314/setup-mold@v1 | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-targets: false | |
| cache-workspace-crates: true | |
| - name: Install dependencies | |
| run: | | |
| sudo apt -y -qq update | |
| sudo apt install -y protobuf-compiler libssl-dev pkg-config | |
| - name: Build query integration tests | |
| run: | | |
| cargo build --locked -p lance --no-default-features --features fp16kernels,slow_tests --tests --test integration_tests | |
| - name: Run query integration tests | |
| run: | | |
| cargo test --locked -p lance --no-default-features --features fp16kernels,slow_tests --test integration_tests | |
| build-no-lock: | |
| runs-on: warp-ubuntu-latest-x64-8x | |
| timeout-minutes: 30 | |
| env: | |
| # Need up-to-date compilers for kernels | |
| CC: clang | |
| CXX: clang++ | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # Remote cargo.lock to force a fresh build | |
| - name: Remove Cargo.lock | |
| run: rm -f Cargo.lock | |
| - uses: rui314/setup-mold@v1 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install -y protobuf-compiler libssl-dev | |
| - name: Build all | |
| run: | | |
| ALL_FEATURES=`cargo metadata --format-version=1 --no-deps | jq -r '.packages[] | .features | keys | .[]' | grep -v -e protoc -e slow_tests | sort | uniq | paste -s -d "," -` | |
| cargo build --profile ci --benches --features ${ALL_FEATURES} --tests | |
| mac-build: | |
| runs-on: warp-macos-14-arm64-6x | |
| timeout-minutes: 45 | |
| strategy: | |
| matrix: | |
| toolchain: | |
| - stable | |
| defaults: | |
| run: | |
| working-directory: ./rust | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Select new xcode | |
| # Default XCode right now is 15.0.1, which contains a bug that causes | |
| # backtraces to not show properly. See: | |
| # https://github.com/rust-lang/rust/issues/113783 | |
| run: sudo xcode-select -s /Applications/Xcode_15.4.app | |
| - name: Install dependencies | |
| run: brew install protobuf | |
| - name: Set up Rust | |
| run: | | |
| rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Build tests | |
| run: | | |
| cargo test --profile ci --locked --features fp16kernels,cli,dynamodb,substrait --no-run | |
| - name: Run tests | |
| run: | | |
| cargo test --profile ci --features fp16kernels,cli,dynamodb,substrait | |
| - name: Check benchmarks | |
| run: | | |
| cargo check --profile ci --benches --features fp16kernels,cli,dynamodb,substrait | |
| windows-build: | |
| runs-on: warp-windows-latest-x64-4x | |
| defaults: | |
| run: | |
| working-directory: rust | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Install Protoc v21.12 | |
| working-directory: C:\ | |
| run: | | |
| New-Item -Path 'C:\protoc' -ItemType Directory | |
| Set-Location C:\protoc | |
| Invoke-WebRequest https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-win64.zip -OutFile C:\protoc\protoc.zip | |
| 7z x protoc.zip | |
| Add-Content $env:GITHUB_PATH "C:\protoc\bin" | |
| shell: powershell | |
| - name: Build tests | |
| run: cargo test --profile ci --locked --no-run | |
| - name: Run tests | |
| run: cargo test --profile ci | |
| - name: Check benchmarks | |
| run: cargo check --profile ci --benches | |
| msrv: | |
| # Check the minimum supported Rust version | |
| name: MSRV Check - Rust v${{ matrix.msrv }} | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| msrv: ["1.91.0"] # This should match up with rust-version in Cargo.toml | |
| env: | |
| # Need up-to-date compilers for kernels | |
| CC: clang | |
| CXX: clang++ | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install -y protobuf-compiler libssl-dev | |
| - name: Install ${{ matrix.msrv }} | |
| run: | | |
| rustup toolchain install ${{ matrix.msrv }} | |
| - name: cargo +${{ matrix.msrv }} check | |
| env: | |
| RUSTUP_TOOLCHAIN: ${{ matrix.msrv }} | |
| run: | | |
| ALL_FEATURES=`cargo metadata --format-version=1 --no-deps | jq -r '.packages[] | .features | keys | .[]' | grep -v -e protoc -e slow_tests | sort | uniq | paste -s -d "," -` | |
| cargo check --profile ci --workspace --tests --benches --features ${ALL_FEATURES} |