Skip to content

Commit ae14aab

Browse files
committed
add inlines
Signed-off-by: Connor Tsui <[email protected]>
1 parent 5340b86 commit ae14aab

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

‎encodings/dict/src/builders/primitive.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,14 +143,14 @@ where
143143
}
144144
})?;
145145

146-
PrimitiveArray::new(codes.freeze(), Validity::NonNullable)
146+
PrimitiveArray::new(codes, Validity::NonNullable)
147147
};
148148

149149
Ok(codes.into_array())
150150
}
151151

152152
fn values(&mut self) -> VortexResult<ArrayRef> {
153-
Ok(PrimitiveArray::new(self.values.clone().freeze(), self.nullability.into()).into_array())
153+
Ok(PrimitiveArray::new(self.values.clone(), self.nullability.into()).into_array())
154154
}
155155
}
156156

‎vortex-array/src/arrays/primitive/mod.rs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ impl PrimitiveArray {
120120
///
121121
/// Returns an error if the provided components do not satisfy the invariants documented in
122122
/// [`PrimitiveArray::new_unchecked`].
123+
#[inline]
123124
pub fn try_new<T: NativePType>(buffer: Buffer<T>, validity: Validity) -> VortexResult<Self> {
124125
Self::validate(&buffer, &validity)?;
125126

@@ -139,6 +140,7 @@ impl PrimitiveArray {
139140
/// ## Validity Requirements
140141
///
141142
/// - If `validity` is [`Validity::Array`], its length must exactly equal `buffer.len()`.
143+
#[inline]
142144
pub unsafe fn new_unchecked<T: NativePType>(buffer: Buffer<T>, validity: Validity) -> Self {
143145
Self {
144146
dtype: DType::Primitive(T::PTYPE, validity.nullability()),
@@ -151,6 +153,7 @@ impl PrimitiveArray {
151153
/// Validates the components that would be used to create a [`PrimitiveArray`].
152154
///
153155
/// This function checks all the invariants required by [`PrimitiveArray::new_unchecked`].
156+
#[inline]
154157
pub(crate) fn validate<T: NativePType>(
155158
buffer: &Buffer<T>,
156159
validity: &Validity,

0 commit comments

Comments
 (0)