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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/actions/setup-rust/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ runs:
run: echo "version=$(cat rust-toolchain.toml | grep channel | awk -F'\"' '{print $2}')" >> $GITHUB_OUTPUT

- name: Install Mold
if: runner.os == 'Linux'
uses: rui314/setup-mold@v1

- name: Rust Toolchain
Expand All @@ -50,6 +51,7 @@ runs:
run: echo "PATH=$PATH" >> $GITHUB_ENV

- name: Install Protoc (for lance-encoding build step)
if: runner.os != 'Windows'
uses: arduino/setup-protoc@v3
with:
version: "29.3"
Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,59 @@ jobs:
--target x86_64-unknown-linux-gnu \
--verbose

rust-test-other:
name: "Rust tests (${{ matrix.os }})"
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
include:
- os: windows-x64
runner:
- runs-on=${{ github.run_id }}
- family=m7i
- cpu=8
- image=windows22-full-x64
- tag=rust-test-windows
- os: linux-arm64
runner:
- runs-on=${{ github.run_id }}
- family=m7g
- cpu=8
- image=ubuntu24-full-arm64
- extras=s3-cache
- tag=rust-test-linux-arm64
runs-on: ${{ matrix.runner }}
steps:
- uses: runs-on/action@v2
if: matrix.os == 'linux-arm64'
with:
sccache: s3
- uses: actions/checkout@v5
- name: Install Visual Studio Build Tools (Windows)
if: matrix.os == 'windows-x64'
shell: bash
run: |
choco install visualstudio2022buildtools --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --passive" -y
- name: Setup Python (Windows)
if: matrix.os == 'windows-x64'
uses: actions/setup-python@v5
with:
python-version: "3.11"
- uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install nextest
uses: taiki-e/install-action@v2
with:
tool: nextest
- name: Rust Tests (Windows)
if: matrix.os == 'windows-x64'
run: cargo nextest run --locked --workspace --all-features --no-fail-fast --exclude bench-vortex --exclude vortex-python --exclude vortex-duckdb
- name: Rust Tests (Other)
if: matrix.os != 'windows-x64'
run: cargo nextest run --locked --workspace --all-features --no-fail-fast --exclude bench-vortex

build-java:
name: "Java"
runs-on: ubuntu-latest
Expand Down
7 changes: 5 additions & 2 deletions vortex-io/src/file/object_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// SPDX-FileCopyrightText: Copyright the Vortex contributors

use std::io;
#[cfg(not(unix))]
use std::io::{Read, Seek};
#[cfg(unix)]
use std::os::unix::fs::FileExt;
use std::sync::Arc;
Expand Down Expand Up @@ -125,8 +127,9 @@ impl ReadSource for ObjectStoreIoSource {
)
.await?;

#[cfg_attr(unix, allow(unused_mut))]
let buffer = match response.payload {
object_store::GetResultPayload::File(file, _) => {
object_store::GetResultPayload::File(mut file, _) => {
// SAFETY: We're setting the length to the exact size we're about to read.
// The read_exact_at call will either fill the entire buffer or return an error,
// ensuring no uninitialized memory is exposed.
Expand All @@ -139,7 +142,7 @@ impl ReadSource for ObjectStoreIoSource {
Ok::<_, io::Error>(buffer)
}
#[cfg(not(unix))] {
file.seek(range.start)?;
file.seek(io::SeekFrom::Start(range.start))?;
file.read_exact(&mut buffer)?;
Ok::<_, io::Error>(buffer)
}
Expand Down
Loading