Skip to content

Commit ab0e1e2

Browse files
committed
wip
Signed-off-by: Joe Isaacs <[email protected]>
1 parent c75c8a3 commit ab0e1e2

File tree

15 files changed

+43
-19
lines changed

15 files changed

+43
-19
lines changed

bench-vortex/src/benchmark_driver.rs

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

155-
#[allow(clippy::too_many_arguments)]
155+
#[expect(
156+
clippy::too_many_arguments,
157+
reason = "all arguments needed for benchmark execution"
158+
)]
156159
fn execute_queries<B: Benchmark>(
157160
queries: &[(usize, String)],
158161
iterations: usize,

bench-vortex/src/statpopgen/builder.rs

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

267-
#[allow(clippy::cognitive_complexity)]
268267
pub fn consume_record(&mut self, header: &Header, record: &mut Record) -> VortexResult<()> {
269268
self.CHROM_builder
270269
.append_value(record.reference_sequence_name());
@@ -352,7 +351,6 @@ impl<'a> GnomADBuilder<'a> {
352351
Ok(())
353352
}
354353

355-
#[allow(clippy::cognitive_complexity)]
356354
pub fn consume_info(&mut self, header: &Header, info: Info) -> VortexResult<()> {
357355
info.iter(header)
358356
.process_results(|iter| -> VortexResult<()> {
@@ -376,7 +374,6 @@ impl<'a> GnomADBuilder<'a> {
376374
})?
377375
}
378376

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

bench-vortex/src/tpch/dbgen.rs

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

7676
impl DBGen {
77-
#[allow(clippy::unwrap_in_result)]
77+
#[expect(
78+
clippy::unwrap_in_result,
79+
reason = "benchmark code where unwrap is acceptable"
80+
)]
7881
/// Generate the TPC-H data files for use with benchmarks.
7982
pub fn generate(&self) -> anyhow::Result<PathBuf> {
8083
let sh = Shell::new()?;

encodings/sparse/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,6 @@ impl ValidityVTable<SparseVTable> for SparseVTable {
386386
array.patches().values().all_invalid()
387387
}
388388

389-
#[allow(clippy::unnecessary_fallible_conversions)]
390389
fn validity_mask(array: &SparseArray) -> Mask {
391390
let fill_is_valid = array.fill_scalar().is_valid();
392391
let values_validity = array.patches().values().validity_mask();

vortex-btrblocks/src/integer/dictionary.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ macro_rules! typed_encode {
4444
}
4545

4646
/// Compresses an integer array into a dictionary arrays according to attached stats.
47-
#[allow(clippy::cognitive_complexity)]
47+
#[expect(
48+
clippy::cognitive_complexity,
49+
reason = "complexity from match on all integer types"
50+
)]
4851
pub fn dictionary_encode(stats: &IntegerStats) -> DictArray {
4952
// We need to preserve the nullability somehow from the original
5053
let src_validity = stats.src.validity();

vortex-btrblocks/src/string.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,18 @@ pub struct StringStats {
4141
}
4242

4343
/// Estimate the number of distinct strings in the var bin view array.
44-
#[allow(clippy::cast_possible_truncation)]
44+
4545
fn estimate_distinct_count(strings: &VarBinViewArray) -> u32 {
4646
let views = strings.views();
4747
// Iterate the views. Two strings which are equal must have the same first 8-bytes.
4848
// NOTE: there are cases where this performs pessimally, e.g. when we have strings that all
4949
// share a 4-byte prefix and have the same length.
5050
let mut distinct = HashSet::with_capacity(views.len() / 2);
5151
views.iter().for_each(|&view| {
52+
#[expect(
53+
clippy::cast_possible_truncation,
54+
reason = "approximate uniqueness with view prefix"
55+
)]
5256
let len_and_prefix = view.as_u128() as u64;
5357
distinct.insert(len_and_prefix);
5458
});

vortex-datafusion/src/persistent/metrics.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,10 @@ fn df_gauge(name: String, value: usize) -> DatafusionMetricValue {
167167
}
168168
}
169169

170-
#[allow(clippy::cast_possible_truncation)]
170+
#[expect(
171+
clippy::cast_possible_truncation,
172+
reason = "truncation is checked before cast"
173+
)]
171174
fn f_to_u(f: f64) -> Option<usize> {
172175
(f.is_finite() && f >= usize::MIN as f64 && f <= usize::MAX as f64).then(||
173176
// After the range check, truncation is guaranteed to keep the value in usize bounds.

vortex-gpu/src/rle_decompress.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ impl<V: DeviceRepr + NativePType, I, O> GPUTask for RLETask<V, I, O> {
7676
}
7777
}
7878

79-
#[allow(clippy::cognitive_complexity)]
79+
#[expect(clippy::cognitive_complexity, reason = "complexity from nested match_each_* macros")]
8080
pub fn new_task(
8181
rle: &RLEArray,
8282
ctx: Arc<CudaContext>,

vortex-layout/src/encoding.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ pub trait LayoutEncoding: 'static + Send + Sync + Debug + private::Sealed {
2828

2929
fn id(&self) -> LayoutEncodingId;
3030

31-
#[allow(clippy::too_many_arguments)]
3231
fn build(
3332
&self,
3433
dtype: &DType,

vortex-layout/src/vtable.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ pub trait VTable: 'static + Sized + Send + Sync + Debug {
7474
) -> VortexResult<crate::gpu::GpuLayoutReaderRef>;
7575

7676
/// Construct a new [`Layout`] from the provided parts.
77-
#[allow(clippy::too_many_arguments)]
7877
fn build(
7978
encoding: &Self::Encoding,
8079
dtype: &DType,

0 commit comments

Comments
 (0)