Skip to content

Commit 098d5f4

Browse files
committed
wip
Signed-off-by: Joe Isaacs <[email protected]>
1 parent 93c4354 commit 098d5f4

File tree

155 files changed

+226
-247
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

155 files changed

+226
-247
lines changed

bench-vortex/build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// SPDX-License-Identifier: Apache-2.0
22
// SPDX-FileCopyrightText: Copyright the Vortex contributors
33

4-
#![allow(clippy::unwrap_used)]
5-
#![allow(clippy::expect_used)]
4+
#![expect(clippy::unwrap_used)]
5+
#![expect(clippy::expect_used)]
66
use std::env;
77
use std::path::PathBuf;
88

bench-vortex/src/benchmark_driver.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ pub fn run_benchmark<B: Benchmark>(benchmark: B, config: DriverConfig) -> Result
152152
)
153153
}
154154

155-
#[allow(clippy::too_many_arguments)]
155+
#[expect(clippy::too_many_arguments)]
156156
fn execute_queries<B: Benchmark>(
157157
queries: &[(usize, String)],
158158
iterations: usize,

bench-vortex/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// SPDX-License-Identifier: Apache-2.0
22
// SPDX-FileCopyrightText: Copyright the Vortex contributors
33

4-
#![allow(clippy::unwrap_used)]
5-
#![allow(clippy::expect_used)]
4+
#![expect(clippy::unwrap_used)]
5+
#![expect(clippy::expect_used)]
66

77
use std::clone::Clone;
88
use std::fmt::Display;

bench-vortex/src/statpopgen/builder.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ impl<'a> GnomADBuilder<'a> {
264264
}
265265
}
266266

267-
#[allow(clippy::cognitive_complexity)]
267+
#[expect(clippy::cognitive_complexity)]
268268
pub fn consume_record(&mut self, header: &Header, record: &mut Record) -> VortexResult<()> {
269269
self.CHROM_builder
270270
.append_value(record.reference_sequence_name());
@@ -352,7 +352,7 @@ impl<'a> GnomADBuilder<'a> {
352352
Ok(())
353353
}
354354

355-
#[allow(clippy::cognitive_complexity)]
355+
#[expect(clippy::cognitive_complexity)]
356356
pub fn consume_info(&mut self, header: &Header, info: Info) -> VortexResult<()> {
357357
info.iter(header)
358358
.process_results(|iter| -> VortexResult<()> {
@@ -376,7 +376,7 @@ impl<'a> GnomADBuilder<'a> {
376376
})?
377377
}
378378

379-
#[allow(clippy::cognitive_complexity)]
379+
#[expect(clippy::cognitive_complexity)]
380380
pub fn finish(mut self) -> Result<RecordBatch, ArrowError> {
381381
let len = self.CHROM_builder.len();
382382
assert_eq!(len, self.POS_builder.len());

bench-vortex/src/tpch/dbgen.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl DBGen {
7474
}
7575

7676
impl DBGen {
77-
#[allow(clippy::unwrap_in_result)]
77+
#[expect(clippy::unwrap_in_result)]
7878
/// Generate the TPC-H data files for use with benchmarks.
7979
pub fn generate(&self) -> anyhow::Result<PathBuf> {
8080
let sh = Shell::new()?;

bench-vortex/src/tpch/tpchgen.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,15 +247,15 @@ fn generate_table_files(
247247
}
248248

249249
/// Calculate the number of partitions without creating expensive iterators
250-
#[allow(clippy::cast_possible_truncation)]
250+
#[expect(clippy::cast_possible_truncation)]
251251
fn calculate_num_parts(generator: TableGenerator, options: &TpchGenOptions) -> Result<usize> {
252252
let scale_factor = options.scale_factor.parse::<f64>()?;
253253

254254
let num_parts = if let Some((data_size, max_file_size)) = generator
255255
.uncompressed_data_size()
256256
.zip(options.max_file_size_mb)
257257
{
258-
#[allow(clippy::cast_precision_loss)]
258+
#[expect(clippy::cast_precision_loss)]
259259
let file_size = (data_size as f64 * scale_factor).ceil() as u64;
260260
file_size.div_ceil(max_file_size)
261261
} else {
@@ -266,7 +266,7 @@ fn calculate_num_parts(generator: TableGenerator, options: &TpchGenOptions) -> R
266266
}
267267

268268
/// Create a single batch iterator for a specific partition
269-
#[allow(clippy::cast_possible_truncation)]
269+
#[expect(clippy::cast_possible_truncation)]
270270
fn create_single_batch_iterator(
271271
generator: TableGenerator,
272272
options: &TpchGenOptions,

encodings/alp/benches/alp_compress.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: Apache-2.0
22
// SPDX-FileCopyrightText: Copyright the Vortex contributors
33

4-
#![allow(clippy::unwrap_used)]
4+
#![expect(clippy::unwrap_used)]
55

66
use divan::Bencher;
77
use rand::rngs::StdRng;

encodings/alp/src/alp/compress.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pub fn alp_encode(parray: &PrimitiveArray, exponents: Option<Exponents>) -> Vort
5656
}
5757
}
5858

59-
#[allow(clippy::cast_possible_truncation)]
59+
#[expect(clippy::cast_possible_truncation)]
6060
fn alp_encode_components_typed<T>(
6161
values: &PrimitiveArray,
6262
exponents: Option<Exponents>,
@@ -154,7 +154,7 @@ pub fn decompress(array: ALPArray) -> PrimitiveArray {
154154
/// # Returns
155155
///
156156
/// A `PrimitiveArray` containing the decompressed values with all patches applied.
157-
#[allow(clippy::cognitive_complexity)]
157+
#[expect(clippy::cognitive_complexity)]
158158
pub fn decompress_chunked(
159159
array: ALPArray,
160160
patches: &Patches,
@@ -282,7 +282,7 @@ mod tests {
282282
}
283283

284284
#[test]
285-
#[allow(clippy::approx_constant)] // Clippy objects to 2.718, an approximation of e, the base of the natural logarithm.
285+
#[expect(clippy::approx_constant)] // Clippy objects to 2.718, an approximation of e, the base of the natural logarithm.
286286
fn test_patched_compress() {
287287
let values = buffer![1.234f64, 2.718, PI, 4.0];
288288
let array = PrimitiveArray::new(values.clone(), Validity::NonNullable);
@@ -298,7 +298,7 @@ mod tests {
298298
}
299299

300300
#[test]
301-
#[allow(clippy::approx_constant)] // Clippy objects to 2.718, an approximation of e, the base of the natural logarithm.
301+
#[expect(clippy::approx_constant)] // Clippy objects to 2.718, an approximation of e, the base of the natural logarithm.
302302
fn test_compress_ignores_invalid_exceptional_values() {
303303
let values = buffer![1.234f64, 2.718, PI, 4.0];
304304
let array = PrimitiveArray::new(values, Validity::from_iter([true, true, false, true]));
@@ -314,7 +314,7 @@ mod tests {
314314
}
315315

316316
#[test]
317-
#[allow(clippy::approx_constant)] // ALP doesn't like E
317+
#[expect(clippy::approx_constant)] // ALP doesn't like E
318318
fn test_nullable_patched_scalar_at() {
319319
let array = PrimitiveArray::from_option_iter([
320320
Some(1.234f64),

encodings/alp/src/alp/compute/compare.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,15 +190,15 @@ mod tests {
190190
vec![1234; 1025]
191191
);
192192

193-
#[allow(clippy::excessive_precision)]
193+
#[expect(clippy::excessive_precision)]
194194
let r_eq = alp_scalar_compare(&encoded, 1.234444_f32, Operator::Eq)
195195
.unwrap()
196196
.unwrap()
197197
.to_bool();
198198

199199
assert!(r_eq.bit_buffer().iter().all(|v| !v));
200200

201-
#[allow(clippy::excessive_precision)]
201+
#[expect(clippy::excessive_precision)]
202202
let r_neq = alp_scalar_compare(&encoded, 1.234444f32, Operator::NotEq)
203203
.unwrap()
204204
.unwrap()

encodings/alp/src/alp/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ pub trait ALPFloat: private::Sealed + Float + Display + NativePType {
147147
encoded_bytes + patch_bytes
148148
}
149149

150-
#[allow(clippy::type_complexity)]
150+
#[expect(clippy::type_complexity)]
151151
fn encode(
152152
values: &[Self],
153153
exponents: Option<Exponents>,
@@ -258,7 +258,7 @@ pub trait ALPFloat: private::Sealed + Float + Display + NativePType {
258258
}
259259
}
260260

261-
#[allow(clippy::cast_possible_truncation)]
261+
#[expect(clippy::cast_possible_truncation)]
262262
fn encode_chunk_unchecked<T: ALPFloat>(
263263
chunk: &[T],
264264
exp: Exponents,
@@ -366,7 +366,7 @@ impl ALPFloat for f32 {
366366
];
367367

368368
#[inline(always)]
369-
#[allow(clippy::cast_possible_truncation)]
369+
#[expect(clippy::cast_possible_truncation)]
370370
fn as_int(self) -> Self::ALPInt {
371371
self as _
372372
}
@@ -438,7 +438,7 @@ impl ALPFloat for f64 {
438438
];
439439

440440
#[inline(always)]
441-
#[allow(clippy::cast_possible_truncation)]
441+
#[expect(clippy::cast_possible_truncation)]
442442
fn as_int(self) -> Self::ALPInt {
443443
self as _
444444
}

0 commit comments

Comments
 (0)