Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
a10y committed Aug 8, 2024
1 parent 55f52f6 commit 82b9775
Show file tree
Hide file tree
Showing 31 changed files with 43 additions and 59 deletions.
2 changes: 1 addition & 1 deletion encodings/alp/src/array.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::fmt::Debug;

use serde::{Deserialize, Serialize};
use vortex::array::primitive::PrimitiveArray;
use vortex::array::PrimitiveArray;
use vortex::stats::ArrayStatisticsCompute;
use vortex::validity::{ArrayValidity, LogicalValidity};
use vortex::variants::{ArrayVariants, PrimitiveArrayTrait};
Expand Down
3 changes: 1 addition & 2 deletions encodings/alp/src/compress.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use itertools::Itertools;
use vortex::array::primitive::PrimitiveArray;
use vortex::array::sparse::{Sparse, SparseArray};
use vortex::array::{PrimitiveArray, Sparse, SparseArray};
use vortex::validity::Validity;
use vortex::{Array, ArrayDType, ArrayDef, IntoArray, IntoArrayVariant};
use vortex_dtype::{NativePType, PType};
Expand Down
4 changes: 2 additions & 2 deletions encodings/byte-bool/src/compute/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use num_traits::AsPrimitive;
use vortex::compute::unary::{FillForwardFn, ScalarAtFn};
use vortex::compute::{ArrayCompute, CompareFn, SliceFn, TakeFn};
use vortex::validity::{ArrayValidity, Validity};
use vortex::{Array, ArrayDType, IntoArray, IntoArrayVariant, ToArrayData};
use vortex::{Array, ArrayDType, IntoArray, IntoArrayVariant};
use vortex_dtype::{match_each_integer_ptype, Nullability};
use vortex_error::VortexResult;
use vortex_expr::Operator;
Expand Down Expand Up @@ -136,7 +136,7 @@ impl CompareFn for ByteBoolArray {
impl FillForwardFn for ByteBoolArray {
fn fill_forward(&self) -> VortexResult<Array> {
if self.dtype().nullability() == Nullability::NonNullable {
return Ok(self.to_array_data().into_array());
return Ok(self.clone().into());
}

let validity = self.logical_validity().to_null_buffer()?.unwrap();
Expand Down
2 changes: 1 addition & 1 deletion encodings/byte-bool/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::mem::ManuallyDrop;

use arrow_buffer::BooleanBuffer;
use serde::{Deserialize, Serialize};
use vortex::array::bool::BoolArray;
use vortex::array::BoolArray;
use vortex::stats::StatsSet;
use vortex::validity::{ArrayValidity, LogicalValidity, Validity, ValidityMetadata};
use vortex::variants::{ArrayVariants, BoolArrayTrait};
Expand Down
3 changes: 1 addition & 2 deletions encodings/datetime-parts/src/compress.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use vortex::array::datetime::{TemporalArray, TimeUnit};
use vortex::array::primitive::PrimitiveArray;
use vortex::array::{PrimitiveArray, TemporalArray, TimeUnit};
use vortex::compute::unary::try_cast;
use vortex::{Array, IntoArray, IntoArrayVariant};
use vortex_dtype::PType;
Expand Down
8 changes: 3 additions & 5 deletions encodings/datetime-parts/src/compute.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use vortex::array::datetime::temporal::TemporalMetadata;
use vortex::array::datetime::{TemporalArray, TimeUnit};
use vortex::array::primitive::PrimitiveArray;
use vortex::array::temporal::TemporalMetadata;
use vortex::array::{PrimitiveArray, TemporalArray, TimeUnit};
use vortex::compute::unary::{scalar_at, ScalarAtFn};
use vortex::compute::{slice, take, ArrayCompute, SliceFn, TakeFn};
use vortex::validity::ArrayValidity;
Expand Down Expand Up @@ -120,8 +119,7 @@ pub fn decode_to_temporal(array: &DateTimePartsArray) -> VortexResult<TemporalAr

#[cfg(test)]
mod test {
use vortex::array::datetime::{TemporalArray, TimeUnit};
use vortex::array::primitive::PrimitiveArray;
use vortex::array::{PrimitiveArray, TemporalArray, TimeUnit};
use vortex::{IntoArray, IntoArrayVariant};
use vortex_dtype::{DType, Nullability};

Expand Down
3 changes: 1 addition & 2 deletions encodings/dict/benches/dict_compress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ use criterion::{black_box, criterion_group, criterion_main, Criterion};
use rand::distributions::{Alphanumeric, Uniform};
use rand::prelude::SliceRandom;
use rand::{thread_rng, Rng};
use vortex::array::primitive::PrimitiveArray;
use vortex::array::varbin::VarBinArray;
use vortex::array::{PrimitiveArray, VarBinArray};
use vortex::ArrayTrait;
use vortex_dict::dict_encode_typed_primitive;
use vortex_dtype::match_each_native_ptype;
Expand Down
6 changes: 2 additions & 4 deletions encodings/dict/src/compress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ use hashbrown::hash_map::{Entry, RawEntryMut};
use hashbrown::HashMap;
use num_traits::AsPrimitive;
use vortex::accessor::ArrayAccessor;
use vortex::array::primitive::PrimitiveArray;
use vortex::array::varbin::VarBinArray;
use vortex::array::{PrimitiveArray, VarBinArray};
use vortex::validity::Validity;
use vortex::{ArrayDType, IntoArray};
use vortex_dtype::{match_each_native_ptype, DType, NativePType, ToBytes};
Expand Down Expand Up @@ -175,8 +174,7 @@ mod test {
use std::str;

use vortex::accessor::ArrayAccessor;
use vortex::array::primitive::PrimitiveArray;
use vortex::array::varbin::VarBinArray;
use vortex::array::{PrimitiveArray, VarBinArray};
use vortex::compute::unary::scalar_at;
use vortex::ToArray;
use vortex_dtype::Nullability::Nullable;
Expand Down
3 changes: 1 addition & 2 deletions encodings/dict/src/compute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ impl SliceFn for DictArray {

#[cfg(test)]
mod test {
use vortex::array::primitive::PrimitiveArray;
use vortex::array::varbin::VarBinArray;
use vortex::array::{PrimitiveArray, VarBinArray};
use vortex::{IntoArray, IntoArrayVariant, ToArray};
use vortex_dtype::{DType, Nullability};

Expand Down
2 changes: 1 addition & 1 deletion encodings/dict/src/dict.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::fmt::Debug;

use serde::{Deserialize, Serialize};
use vortex::accessor::ArrayAccessor;
use vortex::array::bool::BoolArray;
use vortex::array::BoolArray;
use vortex::compute::take;
use vortex::compute::unary::scalar_at;
use vortex::stats::StatsSet;
Expand Down
3 changes: 1 addition & 2 deletions encodings/fastlanes/benches/bitpacking_take.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ use criterion::{black_box, criterion_group, criterion_main, Criterion};
use itertools::Itertools;
use rand::distributions::Uniform;
use rand::{thread_rng, Rng};
use vortex::array::primitive::PrimitiveArray;
use vortex::array::sparse::SparseArray;
use vortex::array::{PrimitiveArray, SparseArray};
use vortex::compute::take;
use vortex_fastlanes::{find_best_bit_width, BitPackedArray};

Expand Down
3 changes: 1 addition & 2 deletions encodings/fastlanes/src/bitpacking/compress.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
use std::mem::size_of;

use fastlanes::BitPacking;
use vortex::array::primitive::PrimitiveArray;
use vortex::array::sparse::{Sparse, SparseArray};
use vortex::array::{PrimitiveArray, Sparse, SparseArray};
use vortex::stats::ArrayStatistics;
use vortex::validity::Validity;
use vortex::{Array, ArrayDType, ArrayDef, IntoArray, IntoArrayVariant};
Expand Down
5 changes: 2 additions & 3 deletions encodings/fastlanes/src/bitpacking/compute/search_sorted.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ use std::cmp::Ordering;
use std::cmp::Ordering::Greater;

use fastlanes::BitPacking;
use vortex::array::primitive::PrimitiveArray;
use vortex::array::sparse::SparseArray;
use vortex::array::{PrimitiveArray, SparseArray};
use vortex::compute::{
search_sorted, IndexOrd, Len, SearchResult, SearchSorted, SearchSortedFn, SearchSortedSide,
};
Expand Down Expand Up @@ -85,7 +84,7 @@ impl Len for BitPackedSearch {

#[cfg(test)]
mod test {
use vortex::array::primitive::PrimitiveArray;
use vortex::array::PrimitiveArray;
use vortex::compute::{search_sorted, slice, SearchResult, SearchSortedSide};
use vortex::IntoArray;

Expand Down
2 changes: 1 addition & 1 deletion encodings/fastlanes/src/bitpacking/compute/slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ impl SliceFn for BitPackedArray {

#[cfg(test)]
mod test {
use vortex::array::primitive::PrimitiveArray;
use vortex::array::PrimitiveArray;
use vortex::compute::slice;
use vortex::compute::unary::scalar_at;
use vortex::IntoArray;
Expand Down
7 changes: 2 additions & 5 deletions encodings/fastlanes/src/bitpacking/compute/take.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ use std::cmp::min;

use fastlanes::BitPacking;
use itertools::Itertools;
use vortex::array::constant::ConstantArray;
use vortex::array::primitive::PrimitiveArray;
use vortex::array::sparse::SparseArray;
use vortex::array::{ConstantArray, PrimitiveArray, SparseArray};
use vortex::compute::{slice, take, TakeFn};
use vortex::{Array, ArrayDType, IntoArray, IntoArrayVariant};
use vortex_dtype::{
Expand Down Expand Up @@ -146,8 +144,7 @@ mod test {
use itertools::Itertools;
use rand::distributions::Uniform;
use rand::{thread_rng, Rng};
use vortex::array::primitive::{Primitive, PrimitiveArray};
use vortex::array::sparse::SparseArray;
use vortex::array::{Primitive, PrimitiveArray, SparseArray};
use vortex::compute::take;
use vortex::compute::unary::scalar_at;
use vortex::{ArrayDef, IntoArray, IntoArrayVariant};
Expand Down
4 changes: 2 additions & 2 deletions encodings/fastlanes/src/bitpacking/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use ::serde::{Deserialize, Serialize};
pub use compress::*;
use vortex::array::primitive::{Primitive, PrimitiveArray};
use vortex::array::{Primitive, PrimitiveArray};
use vortex::stats::{ArrayStatisticsCompute, StatsSet};
use vortex::validity::{ArrayValidity, LogicalValidity, Validity, ValidityMetadata};
use vortex::variants::{ArrayVariants, PrimitiveArrayTrait};
Expand Down Expand Up @@ -212,7 +212,7 @@ impl PrimitiveArrayTrait for BitPackedArray {}

#[cfg(test)]
mod test {
use vortex::array::primitive::PrimitiveArray;
use vortex::array::PrimitiveArray;
use vortex::{IntoArray, IntoArrayVariant};

use crate::BitPackedArray;
Expand Down
2 changes: 1 addition & 1 deletion encodings/fastlanes/src/delta/compress.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use arrayref::{array_mut_ref, array_ref};
use fastlanes::{Delta, Transpose};
use num_traits::{WrappingAdd, WrappingSub};
use vortex::array::primitive::PrimitiveArray;
use vortex::array::PrimitiveArray;
use vortex::compute::unary::fill_forward;
use vortex::validity::Validity;
use vortex::IntoArrayVariant;
Expand Down
3 changes: 1 addition & 2 deletions encodings/fastlanes/src/for/compress.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use itertools::Itertools;
use num_traits::{PrimInt, WrappingAdd, WrappingSub};
use vortex::array::constant::ConstantArray;
use vortex::array::primitive::PrimitiveArray;
use vortex::array::{ConstantArray, PrimitiveArray};
use vortex::stats::{trailing_zeros, ArrayStatistics, Stat};
use vortex::{Array, ArrayDType, IntoArray, IntoArrayVariant};
use vortex_dtype::{match_each_integer_ptype, NativePType};
Expand Down
2 changes: 1 addition & 1 deletion encodings/fastlanes/src/for/compute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ impl SearchSortedFn for FoRArray {

#[cfg(test)]
mod test {
use vortex::array::primitive::PrimitiveArray;
use vortex::array::PrimitiveArray;
use vortex::compute::unary::scalar_at;
use vortex::compute::{search_sorted, SearchResult, SearchSortedSide};
use vortex::IntoArray;
Expand Down
2 changes: 1 addition & 1 deletion encodings/roaring/src/boolean/compress.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use croaring::Bitmap;
use vortex::array::bool::BoolArray;
use vortex::array::BoolArray;
use vortex_error::VortexResult;

use crate::RoaringBoolArray;
Expand Down
4 changes: 2 additions & 2 deletions encodings/roaring/src/boolean/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use arrow_buffer::{BooleanBuffer, Buffer as ArrowBuffer};
pub use compress::*;
pub use croaring::{Bitmap, Portable};
use serde::{Deserialize, Serialize};
use vortex::array::bool::{Bool, BoolArray};
use vortex::array::{Bool, BoolArray};
use vortex::stats::{ArrayStatisticsCompute, StatsSet};
use vortex::validity::{ArrayValidity, LogicalValidity, Validity};
use vortex::variants::{ArrayVariants, BoolArrayTrait};
Expand Down Expand Up @@ -128,7 +128,7 @@ impl IntoCanonical for RoaringBoolArray {

#[cfg(test)]
mod test {
use vortex::array::bool::BoolArray;
use vortex::array::BoolArray;
use vortex::compute::unary::scalar_at;
use vortex::IntoArray;
use vortex_error::VortexResult;
Expand Down
2 changes: 1 addition & 1 deletion encodings/roaring/src/integer/compress.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use croaring::Bitmap;
use num_traits::NumCast;
use vortex::array::primitive::PrimitiveArray;
use vortex::array::PrimitiveArray;
use vortex_dtype::{NativePType, PType};
use vortex_error::VortexResult;

Expand Down
4 changes: 2 additions & 2 deletions encodings/roaring/src/integer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::fmt::Debug;
pub use compress::*;
use croaring::{Bitmap, Portable};
use serde::{Deserialize, Serialize};
use vortex::array::primitive::{Primitive, PrimitiveArray};
use vortex::array::{Primitive, PrimitiveArray};
use vortex::stats::{ArrayStatisticsCompute, StatsSet};
use vortex::validity::{ArrayValidity, LogicalValidity};
use vortex::variants::{ArrayVariants, PrimitiveArrayTrait};
Expand Down Expand Up @@ -103,7 +103,7 @@ impl ArrayStatisticsCompute for RoaringIntArray {}

#[cfg(test)]
mod test {
use vortex::array::primitive::PrimitiveArray;
use vortex::array::PrimitiveArray;
use vortex::compute::unary::scalar_at;
use vortex::IntoArray;
use vortex_error::VortexResult;
Expand Down
2 changes: 1 addition & 1 deletion encodings/runend-bool/src/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ impl ArrayStatisticsCompute for RunEndBoolArray {}

#[cfg(test)]
mod test {
use vortex::array::bool::BoolArray;
use vortex::array::BoolArray;
use vortex::compute::unary::scalar_at;
use vortex::compute::{slice, take};
use vortex::validity::Validity;
Expand Down
5 changes: 2 additions & 3 deletions encodings/runend-bool/src/compress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ use std::cmp::min;

use arrow_buffer::buffer::BooleanBuffer;
use num_traits::{AsPrimitive, FromPrimitive};
use vortex::array::bool::BoolArray;
use vortex::array::primitive::PrimitiveArray;
use vortex::array::{BoolArray, PrimitiveArray};
use vortex::validity::Validity;
use vortex_dtype::{match_each_integer_ptype, NativePType};
use vortex_error::VortexResult;
Expand Down Expand Up @@ -84,7 +83,7 @@ mod test {
use itertools::Itertools;
use rand::prelude::StdRng;
use rand::{Rng, SeedableRng};
use vortex::array::bool::BoolArray;
use vortex::array::BoolArray;
use vortex::compute::SliceFn;
use vortex::validity::Validity;
use vortex::IntoArrayVariant;
Expand Down
2 changes: 1 addition & 1 deletion encodings/runend-bool/src/compute.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use vortex::array::bool::BoolArray;
use vortex::array::BoolArray;
use vortex::compute::unary::ScalarAtFn;
use vortex::compute::{slice, ArrayCompute, SliceFn, TakeFn};
use vortex::{Array, IntoArray, IntoArrayVariant, ToArray};
Expand Down
4 changes: 2 additions & 2 deletions encodings/runend/src/compress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::cmp::min;

use itertools::Itertools;
use num_traits::{AsPrimitive, FromPrimitive};
use vortex::array::primitive::PrimitiveArray;
use vortex::array::PrimitiveArray;
use vortex::stats::{ArrayStatistics, Stat};
use vortex::validity::Validity;
use vortex::ArrayDType;
Expand Down Expand Up @@ -108,7 +108,7 @@ pub fn runend_decode_primitive<

#[cfg(test)]
mod test {
use vortex::array::primitive::PrimitiveArray;
use vortex::array::PrimitiveArray;
use vortex::validity::{ArrayValidity, Validity};
use vortex::IntoArray;

Expand Down
4 changes: 2 additions & 2 deletions encodings/runend/src/compute.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use vortex::array::primitive::PrimitiveArray;
use vortex::array::PrimitiveArray;
use vortex::compute::unary::{scalar_at, ScalarAtFn};
use vortex::compute::{slice, take, ArrayCompute, SliceFn, TakeFn};
use vortex::{Array, IntoArray, IntoArrayVariant};
Expand Down Expand Up @@ -65,7 +65,7 @@ impl SliceFn for RunEndArray {

#[cfg(test)]
mod test {
use vortex::array::primitive::PrimitiveArray;
use vortex::array::PrimitiveArray;
use vortex::compute::take;
use vortex::{IntoArrayVariant, ToArray};

Expand Down
2 changes: 1 addition & 1 deletion encodings/runend/src/runend.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::fmt::Debug;

use serde::{Deserialize, Serialize};
use vortex::array::primitive::{Primitive, PrimitiveArray};
use vortex::array::{Primitive, PrimitiveArray};
use vortex::compute::unary::scalar_at;
use vortex::compute::{search_sorted, SearchSortedSide};
use vortex::stats::{ArrayStatistics, ArrayStatisticsCompute, StatsSet};
Expand Down
2 changes: 1 addition & 1 deletion encodings/zigzag/src/compress.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use vortex::array::primitive::PrimitiveArray;
use vortex::array::PrimitiveArray;
use vortex::validity::Validity;
use vortex::IntoArray;
use vortex_dtype::{NativePType, PType};
Expand Down
2 changes: 1 addition & 1 deletion encodings/zigzag/src/zigzag.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use serde::{Deserialize, Serialize};
use vortex::array::primitive::PrimitiveArray;
use vortex::array::PrimitiveArray;
use vortex::stats::{ArrayStatisticsCompute, StatsSet};
use vortex::validity::{ArrayValidity, LogicalValidity};
use vortex::variants::{ArrayVariants, PrimitiveArrayTrait};
Expand Down

0 comments on commit 82b9775

Please sign in to comment.