Skip to content

Commit 6fd7bd4

Browse files
committed
bump rust version from 1.89 to 1.91
Signed-off-by: Connor Tsui <[email protected]>
1 parent cd80330 commit 6fd7bd4

File tree

22 files changed

+34
-39
lines changed

22 files changed

+34
-39
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ keywords = ["vortex"]
5353
license = "Apache-2.0"
5454
readme = "README.md"
5555
repository = "https://github.com/spiraldb/vortex"
56-
rust-version = "1.89"
56+
rust-version = "1.91"
5757
version = "0.1.0"
5858

5959
[workspace.dependencies]

bench-vortex/src/bin/compress.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ fn compress(
9292
.map(|f| Target::new(Engine::default(), *f))
9393
.collect_vec();
9494

95-
let structlistofints = vec![
95+
let structlistofints = [
9696
StructListOfInts::new(100, 1000, 1),
9797
StructListOfInts::new(1000, 1000, 1),
9898
StructListOfInts::new(10000, 1000, 1),

bench-vortex/src/compress/bench.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ use {
2222
bench_run::run_with_setup,
2323
utils::{convert_utf8view_batch, convert_utf8view_schema},
2424
},
25+
anyhow::Context,
2526
arrow_array::RecordBatch,
2627
parking_lot::Mutex,
2728
std::fs,
@@ -126,9 +127,7 @@ pub fn benchmark_vortex_decompress(
126127
bench_name: &str,
127128
) -> Result<(Duration, CompressionTimingMeasurement)> {
128129
let mut buf = Vec::new();
129-
runtime
130-
.block_on(vortex_compress_write(uncompressed, &mut buf))
131-
.expect("Failed to compress with vortex for decompression test");
130+
runtime.block_on(vortex_compress_write(uncompressed, &mut buf))?;
132131
let buffer = Bytes::from(buf);
133132

134133
// Run the benchmark and measure time.
@@ -250,7 +249,7 @@ pub fn benchmark_lance_compress(
250249
.collect::<Result<Vec<_>, _>>()?;
251250
let converted_schema = convert_utf8view_schema(&schema);
252251

253-
let temp_dir = tempfile::tempdir().expect("Failed to create temp dir");
252+
let temp_dir = tempfile::tempdir().context("Failed to create temp dir")?;
254253
let iteration_paths: Arc<Mutex<Vec<PathBuf>>> = Arc::new(Mutex::new(Vec::new()));
255254
let iteration_counter = AtomicU64::new(0);
256255

@@ -284,7 +283,7 @@ pub fn benchmark_lance_compress(
284283
// Calculate size from the last iteration.
285284
let paths = iteration_paths.lock();
286285
let lance_compressed_size_val = if let Some(last_path) = paths.last() {
287-
calculate_lance_size(last_path).expect("Failed to calculate Lance size")
286+
calculate_lance_size(last_path).context("Failed to calculate Lance size")?
288287
} else {
289288
0
290289
};
@@ -315,7 +314,7 @@ pub fn benchmark_lance_decompress(
315314
// NOTE: Lance requires filesystem access unlike Parquet/Vortex which use in-memory buffers.
316315
let chunked = uncompressed.as_::<ChunkedVTable>().clone();
317316
let (batches, schema) = chunked_to_vec_record_batch(chunked);
318-
let temp_dir = tempfile::tempdir().expect("Failed to create temp dir");
317+
let temp_dir = tempfile::tempdir().context("Failed to create temp dir")?;
319318

320319
// Write the Lance dataset once for all iterations.
321320
let dataset_path = runtime.block_on(async {

bench-vortex/src/engines/df/mod.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,7 @@ pub fn make_object_store(
9797
let s3 = Arc::new(
9898
AmazonS3Builder::from_env()
9999
.with_bucket_name(bucket_name)
100-
.build()
101-
.unwrap(),
100+
.build()?,
102101
);
103102
df.register_object_store(&Url::parse(&format!("s3://{bucket_name}/"))?, s3.clone());
104103
Ok(s3)
@@ -108,8 +107,7 @@ pub fn make_object_store(
108107
let gcs = Arc::new(
109108
GoogleCloudStorageBuilder::from_env()
110109
.with_bucket_name(bucket_name)
111-
.build()
112-
.unwrap(),
110+
.build()?,
113111
);
114112
df.register_object_store(&Url::parse(&format!("gs://{bucket_name}/"))?, gcs.clone());
115113
Ok(gcs)

bench-vortex/src/realnest/gharchive.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,7 @@ impl GithubArchive {
119119

120120
impl Benchmark for GithubArchive {
121121
fn queries(&self) -> anyhow::Result<Vec<(usize, String)>> {
122-
Ok(QUERIES
123-
.iter()
124-
.map(|s| (s.to_string()))
125-
.enumerate()
126-
.collect())
122+
Ok(QUERIES.iter().map(|s| s.to_string()).enumerate().collect())
127123
}
128124

129125
fn generate_data(&self, target: &Target) -> anyhow::Result<()> {

encodings/fastlanes/benches/bitpacking_take.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ fn patched_take_10k_adversarial(bencher: Bencher) {
238238
(0..(NUM_EXCEPTIONS + 1024) / 1024)
239239
.cycle()
240240
.map(|chunk_idx| BIG_BASE2 - 1024 + chunk_idx * 1024)
241-
.flat_map(|base_idx| (base_idx..(base_idx + per_chunk_count)))
241+
.flat_map(|base_idx| base_idx..(base_idx + per_chunk_count))
242242
.take(10000),
243243
);
244244

encodings/fastlanes/src/delta/array/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ impl DeltaArray {
122122

123123
let lanes = lane_count(ptype);
124124

125-
if (deltas.len() % 1024 == 0) != (bases.len() % lanes == 0) {
125+
if deltas.len().is_multiple_of(1024) != bases.len().is_multiple_of(lanes) {
126126
vortex_bail!(
127127
"deltas length ({}) is a multiple of 1024 iff bases length ({}) is a multiple of LANES ({})",
128128
deltas.len(),

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[toolchain]
2-
channel = "1.89"
2+
channel = "1.91"
33
components = ["rust-src", "rustfmt", "clippy", "rust-analyzer"]
44
profile = "minimal"

vortex-array/benches/chunk_array_builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ fn make_opt_bool_chunks(len: usize, chunk_count: usize) -> ArrayRef {
116116
let mut rng = StdRng::seed_from_u64(0);
117117

118118
const SPAN_LEN: usize = 10;
119-
assert!(len % SPAN_LEN == 0);
119+
assert!(len.is_multiple_of(SPAN_LEN));
120120

121121
(0..chunk_count)
122122
.map(|_| {

vortex-array/benches/varbinview_zip.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,5 @@ fn alternating_mask(len: usize) -> Mask {
7878
}
7979

8080
fn block_mask(len: usize, block: usize) -> Mask {
81-
Mask::from_iter((0..len).map(|i| (i / block) % 2 == 0))
81+
Mask::from_iter((0..len).map(|i| (i / block).is_multiple_of(2)))
8282
}

0 commit comments

Comments
 (0)