From 28717ad5aa98511574aee8ff7730d2f3ace2602a Mon Sep 17 00:00:00 2001 From: Robert Kruszewski Date: Thu, 5 Sep 2024 13:26:29 -0400 Subject: [PATCH] Upgrade rust nightly toolchain & MSRV (#745) --- Cargo.toml | 2 +- rust-toolchain.toml | 2 +- vortex-array/src/compute/unary/fill_forward.rs | 1 + vortex-array/src/iter/mod.rs | 1 + vortex-array/src/metadata.rs | 1 + vortex-serde/src/layouts/pruning.rs | 4 +++- vortex-serde/src/layouts/read/layouts.rs | 5 ----- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index fa08b47d47..0132f249ef 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,7 +36,7 @@ include = [ "flatbuffers/*.fbs", ] edition = "2021" -rust-version = "1.76" +rust-version = "1.81" [workspace.dependencies] libfuzzer-sys = "0.4" diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 1554cb46ae..29dfd5d6c0 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "nightly-2024-06-19" +channel = "nightly-2024-09-04" components = ["rust-src", "rustfmt", "clippy"] profile = "minimal" diff --git a/vortex-array/src/compute/unary/fill_forward.rs b/vortex-array/src/compute/unary/fill_forward.rs index c2ef475a30..6682deb4bc 100644 --- a/vortex-array/src/compute/unary/fill_forward.rs +++ b/vortex-array/src/compute/unary/fill_forward.rs @@ -3,6 +3,7 @@ use vortex_error::{vortex_err, VortexResult}; use crate::{Array, ArrayDType}; /// Trait for filling forward on an array, i.e., replacing nulls with the last non-null value. +/// /// If the array is non-nullable, it is returned as-is. /// If the array is entirely nulls, the fill forward operation returns an array of the same length, filled with the default value of the array's type. /// The DType of the returned array is the same as the input array; the Validity of the returned array is always either NonNullable or AllValid. diff --git a/vortex-array/src/iter/mod.rs b/vortex-array/src/iter/mod.rs index 56077944a0..c7a46826a9 100644 --- a/vortex-array/src/iter/mod.rs +++ b/vortex-array/src/iter/mod.rs @@ -58,6 +58,7 @@ pub trait Accessor: Send + Sync { } /// Iterate over batches of compressed arrays, should help with writing vectorized code. +/// /// Note that it doesn't respect per-item validity, and the per-item `Validity` instance should be advised /// for correctness, must "high-performance" code will ignore the validity when doing work, and will only /// re-use it when reconstructing the result array. diff --git a/vortex-array/src/metadata.rs b/vortex-array/src/metadata.rs index 0569f4f97b..01639f8254 100644 --- a/vortex-array/src/metadata.rs +++ b/vortex-array/src/metadata.rs @@ -7,6 +7,7 @@ use serde::{Deserialize, Serialize}; use vortex_error::{vortex_err, VortexResult}; /// Dynamic trait used to represent opaque owned Array metadata +/// /// Note that this allows us to restrict the ('static + Send + Sync) requirement to just the /// metadata trait, and not the entire array trait. We require 'static so that we can downcast /// use the Any trait. diff --git a/vortex-serde/src/layouts/pruning.rs b/vortex-serde/src/layouts/pruning.rs index 2730fa2ac1..4d4b2c8853 100644 --- a/vortex-serde/src/layouts/pruning.rs +++ b/vortex-serde/src/layouts/pruning.rs @@ -1,3 +1,6 @@ +// This code doesn't have usage outside of tests yet, remove once usage is added +#![allow(dead_code)] + use std::collections::hash_map::Entry; use std::sync::Arc; @@ -8,7 +11,6 @@ use vortex_dtype::Nullability; use vortex_expr::{BinaryExpr, Column, Literal, Operator, VortexExpr}; use vortex_scalar::Scalar; -#[allow(dead_code)] pub struct PruningPredicate { expr: Arc, stats_to_fetch: HashMap>, diff --git a/vortex-serde/src/layouts/read/layouts.rs b/vortex-serde/src/layouts/read/layouts.rs index ac9fad9e23..30d04be095 100644 --- a/vortex-serde/src/layouts/read/layouts.rs +++ b/vortex-serde/src/layouts/read/layouts.rs @@ -42,11 +42,6 @@ impl FlatLayout { state: FlatLayoutState::Init, } } - - #[allow(clippy::len_without_is_empty)] - pub fn len(&self) -> usize { - self.range.len() - } } impl Layout for FlatLayout {