Skip to content

Commit

Permalink
Remove as_ref
Browse files Browse the repository at this point in the history
  • Loading branch information
gatesn committed Mar 22, 2024
1 parent 23c0d42 commit 8811ef3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion vortex-array/src/encode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ use crate::array::{Array, ArrayRef};
use crate::datetime::{LocalDateTime, LocalDateTimeArray};
use crate::ptype::PType;
use crate::scalar::NullScalar;
use crate::stats::Stat;

pub trait FromArrowArray<A> {
fn from_arrow(array: A, nullable: bool) -> Self;
Expand All @@ -53,7 +54,10 @@ impl IntoArray for NullBuffer {
impl<O: OffsetSizeTrait> IntoArray for OffsetBuffer<O> {
fn into_array(self) -> ArrayRef {
let ptype = if O::IS_LARGE { PType::I64 } else { PType::I32 };
PrimitiveArray::new(ptype, self.into_inner().into_inner(), None).into_array()
let array = PrimitiveArray::new(ptype, self.into_inner().into_inner(), None).into_array();
array.stats().set(Stat::IsSorted, true.into());
array.stats().set(Stat::IsStrictSorted, true.into());
array
}
}

Expand Down

0 comments on commit 8811ef3

Please sign in to comment.