Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-import array types #559

Merged
merged 2 commits into from
Aug 6, 2024
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 bench-vortex/src/data_downloads.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use bzip2::read::BzDecoder;
use log::info;
use parquet::arrow::arrow_reader::ParquetRecordBatchReaderBuilder;
use tokio::runtime::Runtime;
use vortex::array::chunked::ChunkedArray;
use vortex::array::ChunkedArray;
use vortex::arrow::FromArrowType;
use vortex::{IntoArray, ToArrayData};
use vortex_dtype::DType;
Expand Down
2 changes: 1 addition & 1 deletion bench-vortex/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use log::{info, LevelFilter};
use parquet::arrow::arrow_reader::ParquetRecordBatchReaderBuilder;
use parquet::arrow::ProjectionMask;
use simplelog::{ColorChoice, Config, TermLogger, TerminalMode};
use vortex::array::chunked::ChunkedArray;
use vortex::array::ChunkedArray;
use vortex::arrow::FromArrowType;
use vortex::compress::CompressionStrategy;
use vortex::encoding::EncodingRef;
Expand Down
3 changes: 1 addition & 2 deletions bench-vortex/src/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ use parquet::arrow::async_reader::{AsyncFileReader, ParquetObjectReader};
use parquet::arrow::ParquetRecordBatchStreamBuilder;
use serde::{Deserialize, Serialize};
use stream::StreamExt;
use vortex::array::chunked::ChunkedArray;
use vortex::array::primitive::PrimitiveArray;
use vortex::array::{ChunkedArray, PrimitiveArray};
use vortex::arrow::FromArrowType;
use vortex::compress::CompressionStrategy;
use vortex::stream::ArrayStreamExt;
Expand Down
2 changes: 1 addition & 1 deletion bench-vortex/src/tpch/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use arrow_schema::Schema;
use datafusion::dataframe::DataFrameWriteOptions;
use datafusion::datasource::MemTable;
use datafusion::prelude::{CsvReadOptions, ParquetReadOptions, SessionContext};
use vortex::array::chunked::ChunkedArray;
use vortex::array::ChunkedArray;
use vortex::arrow::FromArrowArray;
use vortex::{Array, ArrayDType, ArrayData, IntoArray};
use vortex_datafusion::memory::VortexMemTableOptions;
Expand Down
3 changes: 1 addition & 2 deletions bench-vortex/src/vortex_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ use std::fs::File;
use std::os::unix::prelude::MetadataExt;
use std::path::PathBuf;

use vortex::array::chunked::ChunkedArray;
use vortex::array::struct_::StructArray;
use vortex::array::{ChunkedArray, StructArray};
use vortex::variants::StructArrayTrait;
use vortex::ArrayDType;
use vortex_dtype::DType;
Expand Down
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
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
Loading
Loading