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: 1 addition & 1 deletion benchmarks/datafusion-bench/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use vortex_datafusion::VortexFormat;
use vortex_datafusion::VortexFormatFactory;
use vortex_datafusion::VortexTableOptions;

#[allow(clippy::expect_used)]
#[expect(clippy::expect_used)]
pub fn get_session_context() -> SessionContext {
let mut rt_builder = RuntimeEnvBuilder::new();

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/datafusion-bench/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ async fn main() -> anyhow::Result<()> {

// Collect execution plans for metrics if show_metrics is enabled
// Structure: (query_idx, format, execution_plan)
#[allow(clippy::type_complexity)]
#[expect(clippy::type_complexity)]
let collected_plans: Arc<Mutex<Vec<(usize, Format, Arc<dyn ExecutionPlan>)>>> =
Arc::new(Mutex::new(Vec::new()));
let show_metrics = args.show_metrics;
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/datafusion-bench/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ impl MetricsSetExt for MetricsSet {
}
}

#[allow(clippy::disallowed_types)]
#[expect(clippy::disallowed_types)]
fn aggregate(&self) -> Self {
use std::collections::HashMap;
let mut map = HashMap::new();
Expand Down
3 changes: 1 addition & 2 deletions benchmarks/duckdb-bench/build.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright the Vortex contributors

#![allow(clippy::unwrap_used)]
#![allow(clippy::expect_used)]
#![expect(clippy::unwrap_used)]

/// Adds a dynamic linker runtime path pointing to the DuckDB dylib dir.
///
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/random-access-bench/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@ fn generate_indices(dataset: &dyn BenchDataset, pattern: AccessPattern) -> Vec<u
// ~POISSON_EXPECTED_COUNT indices across the dataset.
let rate = POISSON_EXPECTED_COUNT as f64 / row_count as f64;
// SAFETY: rate is always positive (POISSON_EXPECTED_COUNT > 0, row_count > 0).
#[allow(clippy::unwrap_used)]
#[expect(clippy::unwrap_used)]
let exp = Exp::new(rate).unwrap();
let mut indices = Vec::with_capacity(POISSON_EXPECTED_COUNT);
let mut pos = 0.0_f64;
loop {
let gap: f64 = exp.sample(&mut rng);
pos += gap;
#[allow(clippy::cast_possible_truncation)]
#[expect(clippy::cast_possible_truncation)]
let idx = pos as u64;
if idx >= row_count {
break;
Expand Down
2 changes: 1 addition & 1 deletion encodings/alp/benches/alp_compress.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright the Vortex contributors

#![allow(clippy::unwrap_used)]
#![expect(clippy::unwrap_used)]

use divan::Bencher;
use rand::RngExt;
Expand Down
6 changes: 3 additions & 3 deletions encodings/alp/src/alp/compress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ mod tests {
}

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

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

#[test]
#[allow(clippy::approx_constant)] // ALP doesn't like E
#[expect(clippy::approx_constant)] // ALP doesn't like E
fn test_nullable_patched_scalar_at() {
let array = PrimitiveArray::from_option_iter([
Some(1.234f64),
Expand Down
2 changes: 0 additions & 2 deletions encodings/alp/src/alp/compute/compare.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,14 +213,12 @@ mod tests {
vec![1234; 1025]
);

#[allow(clippy::excessive_precision)]
let r_eq = alp_scalar_compare(encoded.as_view(), 1.234444_f32, CompareOperator::Eq)
.unwrap()
.unwrap();
let expected = BoolArray::from_iter([false; 1025]);
assert_arrays_eq!(r_eq, expected);

#[allow(clippy::excessive_precision)]
let r_neq = alp_scalar_compare(encoded.as_view(), 1.234444f32, CompareOperator::NotEq)
.unwrap()
.unwrap();
Expand Down
2 changes: 1 addition & 1 deletion encodings/alp/src/alp_rd/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright the Vortex contributors

#![allow(clippy::cast_possible_truncation)]
#![expect(clippy::cast_possible_truncation)]

pub use array::*;
use vortex_array::ExecutionCtx;
Expand Down
4 changes: 1 addition & 3 deletions encodings/fastlanes/benches/bit_transpose.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright the Vortex contributors

#![allow(clippy::unwrap_used)]

use divan::Bencher;
use vortex_fastlanes::bit_transpose::scalar::transpose_bits_scalar;
use vortex_fastlanes::bit_transpose::scalar::untranspose_bits_scalar;
Expand All @@ -12,7 +10,7 @@ fn main() {
}

/// Generate deterministic test data.
#[allow(clippy::cast_possible_truncation)]
#[expect(clippy::cast_possible_truncation)]
fn generate_test_data(seed: usize) -> [u8; 128] {
let mut data = [0u8; 128];
for (i, byte) in data.iter_mut().enumerate() {
Expand Down
4 changes: 2 additions & 2 deletions encodings/fastlanes/benches/bitpacking_take.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright the Vortex contributors

#![allow(clippy::unwrap_used)]
#![allow(clippy::cast_possible_truncation)]
#![expect(clippy::unwrap_used)]
#![expect(clippy::cast_possible_truncation)]

use divan::Bencher;
use rand::RngExt;
Expand Down
6 changes: 3 additions & 3 deletions encodings/fastlanes/src/bit_transpose/aarch64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ static SCATTER_8X8_NEON: [[u8; 16]; 4] = [
];

/// Perform 8x8 bit transpose on two u64s packed in a `uint64x2_t`.
#[allow(unsafe_op_in_unsafe_fn)]
#[expect(unsafe_op_in_unsafe_fn)]
unsafe fn bit_transpose_8x8_neon(mut v: uint64x2_t) -> uint64x2_t {
let mask1 = vdupq_n_u64(TRANSPOSE_2X2);
let t = vandq_u64(veorq_u64(v, vshrq_n_u64::<7>(v)), mask1);
Expand All @@ -137,7 +137,7 @@ unsafe fn bit_transpose_8x8_neon(mut v: uint64x2_t) -> uint64x2_t {
///
/// # Safety
/// Requires `AArch64` with NEON (always available on `AArch64`).
#[allow(unsafe_op_in_unsafe_fn)]
#[expect(unsafe_op_in_unsafe_fn)]
#[inline(never)]
pub unsafe fn transpose_bits_neon(input: &[u8; 128], output: &mut [u8; 128]) {
// Load all 128 input bytes into two uint8x16x4_t tables (64 bytes each)
Expand Down Expand Up @@ -197,7 +197,7 @@ pub unsafe fn transpose_bits_neon(input: &[u8; 128], output: &mut [u8; 128]) {
///
/// # Safety
/// Requires `AArch64` with NEON (always available on `AArch64`).
#[allow(unsafe_op_in_unsafe_fn)]
#[expect(unsafe_op_in_unsafe_fn)]
#[inline(never)]
pub unsafe fn untranspose_bits_neon(input: &[u8; 128], output: &mut [u8; 128]) {
// Load scatter indices (SCATTER_8X8 is self-inverse, so same table un-scatters)
Expand Down
2 changes: 1 addition & 1 deletion encodings/fastlanes/src/bit_transpose/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ pub fn untranspose_bits(input: &[u8; 128], output: &mut [u8; 128]) {
}

#[cfg(test)]
#[allow(clippy::cast_possible_truncation)]
#[expect(clippy::cast_possible_truncation)]
fn generate_test_data(seed: u8) -> [u8; 128] {
let mut data = [0u8; 128];
for (i, byte) in data.iter_mut().enumerate() {
Expand Down
2 changes: 0 additions & 2 deletions encodings/fastlanes/src/bit_transpose/scalar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ use crate::bit_transpose::TRANSPOSE_8X8;
/// This version uses 64-bit gather + parallel bit operations instead of
/// extracting bits one by one. Typically 5-10x faster than the basic scalar version.
#[inline(never)]
#[allow(dead_code)]
pub fn transpose_bits_scalar(input: &[u8; 128], output: &mut [u8; 128]) {
// Helper to perform 8x8 bit transpose on a u64 (each byte becomes a row)
fn transpose_8x8(mut x: u64) -> u64 {
Expand Down Expand Up @@ -85,7 +84,6 @@ pub fn transpose_bits_scalar(input: &[u8; 128], output: &mut [u8; 128]) {

/// Fast scalar untranspose using the 8x8 bit matrix transpose algorithm.
#[inline(never)]
#[allow(dead_code)]
pub fn untranspose_bits_scalar(input: &[u8; 128], output: &mut [u8; 128]) {
Comment thread
joseph-isaacs marked this conversation as resolved.
fn transpose_8x8(mut x: u64) -> u64 {
let t = (x ^ (x >> 7)) & TRANSPOSE_2X2;
Expand Down
18 changes: 8 additions & 10 deletions encodings/fastlanes/src/bit_transpose/x86.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ pub fn has_vbmi() -> bool {
/// Requires BMI2 support. Check with `has_bmi2()` before calling.
#[target_feature(enable = "bmi2")]
#[inline(never)]
#[allow(clippy::too_many_lines)]
#[allow(unsafe_op_in_unsafe_fn)]
#[expect(clippy::too_many_lines)]
pub unsafe fn transpose_bits_bmi2(input: &[u8; 128], output: &mut [u8; 128]) {
// Helper to gather 8 bytes at stride 16 into a u64
fn gather(input: &[u8; 128], base: usize) -> u64 {
Expand Down Expand Up @@ -233,8 +232,7 @@ pub unsafe fn transpose_bits_bmi2(input: &[u8; 128], output: &mut [u8; 128]) {
/// Requires BMI2 support. Check with `has_bmi2()` before calling.
#[target_feature(enable = "bmi2")]
#[inline(never)]
#[allow(clippy::too_many_lines)]
#[allow(unsafe_op_in_unsafe_fn)]
#[expect(clippy::too_many_lines)]
pub unsafe fn untranspose_bits_bmi2(input: &[u8; 128], output: &mut [u8; 128]) {
// Helper: scatter a u64 to 8 output bytes at stride 16
fn scatter(output: &mut [u8; 128], base: usize, val: u64) {
Expand Down Expand Up @@ -492,9 +490,9 @@ static SCATTER_8X8: [u8; 64] = [
/// Requires AVX-512F, AVX-512BW, and AVX-512VBMI support.
#[target_feature(enable = "avx512f", enable = "avx512bw", enable = "avx512vbmi")]
#[inline(never)]
#[allow(clippy::cast_possible_wrap)]
#[allow(clippy::cast_ptr_alignment)]
#[allow(unsafe_op_in_unsafe_fn)]
#[expect(clippy::cast_possible_wrap)]
#[expect(clippy::cast_ptr_alignment)]
#[expect(unsafe_op_in_unsafe_fn)]
pub unsafe fn transpose_bits_vbmi(input: &[u8; 128], output: &mut [u8; 128]) {
// Load all 128 input bytes into two ZMM registers
let in_lo = _mm512_loadu_si512(input.as_ptr().cast::<__m512i>());
Expand Down Expand Up @@ -547,9 +545,9 @@ pub unsafe fn transpose_bits_vbmi(input: &[u8; 128], output: &mut [u8; 128]) {
/// Requires AVX-512F, AVX-512BW, and AVX-512VBMI support.
#[target_feature(enable = "avx512f", enable = "avx512bw", enable = "avx512vbmi")]
#[inline(never)]
#[allow(clippy::cast_possible_wrap)]
#[allow(clippy::cast_ptr_alignment)]
#[allow(unsafe_op_in_unsafe_fn)]
#[expect(clippy::cast_possible_wrap)]
#[expect(clippy::cast_ptr_alignment)]
#[expect(unsafe_op_in_unsafe_fn)]
pub unsafe fn untranspose_bits_vbmi(input: &[u8; 128], output: &mut [u8; 128]) {
// For untranspose, we gather consecutive bytes from transposed layout,
// then scatter back to stride-16 positions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub fn bitpack_to_best_bit_width(array: &PrimitiveArray) -> VortexResult<BitPack
bitpack_encode(array, best_bit_width, Some(&bit_width_freq))
}

#[allow(unused_comparisons, clippy::absurd_extreme_comparisons)]
#[expect(unused_comparisons, clippy::absurd_extreme_comparisons)]
pub fn bitpack_encode(
array: &PrimitiveArray,
bit_width: u8,
Expand Down
2 changes: 1 addition & 1 deletion encodings/fastlanes/src/bitpacking/compute/take.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ fn take_primitive<T: NativePType + BitPacking, I: IntegerPType>(
}

#[cfg(test)]
#[allow(clippy::cast_possible_truncation)]
#[expect(clippy::cast_possible_truncation)]
mod test {
use rand::RngExt;
use rand::distr::Uniform;
Expand Down
1 change: 0 additions & 1 deletion encodings/fastlanes/src/for/compute/compare.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ mod tests {
#[test]
fn compare_large_constant() {
let reference = Scalar::from(-9219218377546224477i64);
#[allow(clippy::cast_possible_truncation)]
let lhs = for_arr(
PrimitiveArray::new(
buffer![0i64, 9654309310445864926u64 as i64],
Expand Down
2 changes: 1 addition & 1 deletion encodings/fastlanes/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright the Vortex contributors

#![allow(clippy::cast_possible_truncation)]
#![expect(clippy::cast_possible_truncation)]

pub use bitpacking::*;
pub use delta::*;
Expand Down
2 changes: 1 addition & 1 deletion encodings/fsst/benches/fsst_compress.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright the Vortex contributors

#![allow(clippy::unwrap_used)]
#![expect(clippy::unwrap_used)]

use std::sync::LazyLock;

Expand Down
2 changes: 1 addition & 1 deletion encodings/fsst/benches/fsst_like.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright the Vortex contributors

#![allow(clippy::unwrap_used)]
#![expect(clippy::unwrap_used)]

use std::fmt;
use std::sync::LazyLock;
Expand Down
2 changes: 1 addition & 1 deletion encodings/fsst/benches/fsst_url_compare.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright the Vortex contributors

#![allow(clippy::unwrap_used)]
#![expect(clippy::unwrap_used)]

use std::sync::LazyLock;

Expand Down
4 changes: 1 addition & 3 deletions encodings/fsst/src/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,8 @@ impl VTable for FSST {
/// Lengths of the original values before compression, can be compressed.
pub(crate) const UNCOMPRESSED_LENGTHS_SLOT: usize = 0;
/// The offsets array for the FSST-compressed codes.
#[allow(dead_code, reason = "reserved for back-compat slot numbering")]
pub(crate) const CODES_OFFSETS_SLOT: usize = 1;
/// The validity bitmap for the compressed codes.
#[allow(dead_code, reason = "reserved for back-compat slot numbering")]
pub(crate) const CODES_VALIDITY_SLOT: usize = 2;
pub(crate) const NUM_SLOTS: usize = 3;
pub(crate) const SLOT_NAMES: [&str; NUM_SLOTS] =
Expand Down Expand Up @@ -526,7 +524,7 @@ impl FSSTData {
}

/// Validate using the decomposed components (codes bytes + offsets + nullability).
#[allow(clippy::too_many_arguments)]
#[expect(clippy::too_many_arguments)]
fn validate_parts(
symbols: &Buffer<Symbol>,
symbol_lengths: &Buffer<u8>,
Expand Down
4 changes: 2 additions & 2 deletions encodings/fsst/src/canonical.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pub(crate) fn fsst_decode_views(
.clone()
.execute::<PrimitiveArray>(ctx)?;

#[allow(clippy::cast_possible_truncation)]
#[expect(clippy::cast_possible_truncation)]
let total_size: usize = match_each_integer_ptype!(uncompressed_lens_array.ptype(), |P| {
uncompressed_lens_array
.as_slice::<P>()
Expand Down Expand Up @@ -148,7 +148,7 @@ mod tests {
}

fn make_data_chunked() -> (ChunkedArray, Vec<Option<Vec<u8>>>) {
#[allow(clippy::type_complexity)]
#[expect(clippy::type_complexity)]
let (arr_vec, data_vec): (Vec<ArrayRef>, Vec<Vec<Option<Vec<u8>>>>) = (0..10)
.map(|_| {
let (array, data) = make_data();
Expand Down
2 changes: 0 additions & 2 deletions encodings/fsst/src/compute/like.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright the Vortex contributors

#![allow(clippy::cast_possible_truncation)]

use vortex_array::ArrayRef;
use vortex_array::ArrayView;
use vortex_array::ExecutionCtx;
Expand Down
2 changes: 1 addition & 1 deletion encodings/fsst/src/test_utils.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright the Vortex contributors

#![allow(clippy::unwrap_used)]
#![expect(clippy::unwrap_used)]

use rand::RngExt;
use rand::SeedableRng;
Expand Down
2 changes: 1 addition & 1 deletion encodings/pco/src/test.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright the Vortex contributors
#![allow(clippy::cast_possible_truncation)]
#![expect(clippy::cast_possible_truncation)]

use std::sync::LazyLock;

Expand Down
4 changes: 2 additions & 2 deletions encodings/runend/benches/run_end_compress.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright the Vortex contributors

#![allow(clippy::unwrap_used)]
#![expect(clippy::unwrap_used)]

use divan::Bencher;
use itertools::repeat_n;
Expand Down Expand Up @@ -77,7 +77,7 @@ fn decompress<T: IntegerPType>(bencher: Bencher, (length, run_step): (usize, usi
}

#[divan::bench(args = BENCH_ARGS)]
#[allow(clippy::cast_possible_truncation)]
#[expect(clippy::cast_possible_truncation)]
fn take_indices(bencher: Bencher, (length, run_step): (usize, usize)) {
let values = PrimitiveArray::new(
(0..length)
Expand Down
2 changes: 1 addition & 1 deletion encodings/runend/benches/run_end_decode.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright the Vortex contributors

#![allow(clippy::unwrap_used, clippy::cast_possible_truncation)]
#![expect(clippy::cast_possible_truncation)]

use std::fmt;

Expand Down
Loading
Loading