From f0c63df3d02ecaba706a0d8227584756ff5ec45a Mon Sep 17 00:00:00 2001 From: Adam Gutglick Date: Tue, 6 Aug 2024 13:59:35 +0100 Subject: [PATCH] Re-import array types (#559) Yet another PR making access to all the core array types slightly easier. --- bench-vortex/src/data_downloads.rs | 2 +- bench-vortex/src/lib.rs | 2 +- bench-vortex/src/reader.rs | 3 +- bench-vortex/src/tpch/mod.rs | 2 +- bench-vortex/src/vortex_utils.rs | 3 +- encodings/alp/src/array.rs | 2 +- encodings/alp/src/compress.rs | 3 +- encodings/byte-bool/src/lib.rs | 2 +- encodings/datetime-parts/src/compress.rs | 3 +- encodings/datetime-parts/src/compute.rs | 8 ++--- encodings/dict/benches/dict_compress.rs | 3 +- encodings/dict/src/compress.rs | 6 ++-- encodings/dict/src/compute.rs | 3 +- encodings/dict/src/dict.rs | 2 +- .../fastlanes/benches/bitpacking_take.rs | 3 +- .../fastlanes/src/bitpacking/compress.rs | 3 +- .../src/bitpacking/compute/search_sorted.rs | 5 ++- .../fastlanes/src/bitpacking/compute/slice.rs | 2 +- .../fastlanes/src/bitpacking/compute/take.rs | 7 ++-- encodings/fastlanes/src/bitpacking/mod.rs | 4 +-- encodings/fastlanes/src/delta/compress.rs | 2 +- encodings/fastlanes/src/for/compress.rs | 3 +- encodings/fastlanes/src/for/compute.rs | 2 +- encodings/roaring/src/boolean/compress.rs | 2 +- encodings/roaring/src/boolean/mod.rs | 4 +-- encodings/roaring/src/integer/compress.rs | 2 +- encodings/roaring/src/integer/mod.rs | 4 +-- encodings/runend-bool/src/array.rs | 2 +- encodings/runend-bool/src/compress.rs | 5 ++- encodings/runend-bool/src/compute.rs | 2 +- encodings/runend/src/compress.rs | 4 +-- encodings/runend/src/compute.rs | 4 +-- encodings/runend/src/runend.rs | 2 +- encodings/zigzag/src/compress.rs | 2 +- encodings/zigzag/src/zigzag.rs | 2 +- pyvortex/src/array.rs | 14 ++++---- pyvortex/src/encode.rs | 2 +- pyvortex/src/vortex_arrow.rs | 2 +- vortex-array/benches/compare.rs | 2 +- vortex-array/benches/scalar_subtract.rs | 2 +- vortex-array/src/array/bool/accessors.rs | 4 +-- .../src/array/bool/compute/boolean.rs | 2 +- .../src/array/bool/compute/compare.rs | 2 +- vortex-array/src/array/bool/compute/fill.rs | 4 +-- vortex-array/src/array/bool/compute/filter.rs | 4 +-- vortex-array/src/array/bool/compute/mod.rs | 2 +- .../src/array/bool/compute/scalar_at.rs | 2 +- vortex-array/src/array/bool/compute/slice.rs | 2 +- vortex-array/src/array/bool/compute/take.rs | 4 +-- vortex-array/src/array/bool/mod.rs | 2 +- vortex-array/src/array/bool/stats.rs | 4 +-- vortex-array/src/array/chunked/canonical.rs | 2 +- vortex-array/src/array/constant/canonical.rs | 2 +- vortex-array/src/array/constant/compute.rs | 2 +- vortex-array/src/array/mod.rs | 34 +++++++++++++------ .../src/array/primitive/compute/compare.rs | 2 +- .../src/array/primitive/compute/fill.rs | 2 +- .../src/array/primitive/compute/filter.rs | 2 +- .../array/primitive/compute/filter_indices.rs | 2 +- vortex-array/src/array/sparse/flatten.rs | 4 +-- vortex-array/src/array/struct_/mod.rs | 2 +- .../src/array/varbin/compute/filter.rs | 2 +- vortex-array/src/arrow/array.rs | 12 +++---- vortex-array/src/arrow/dtype.rs | 2 +- vortex-array/src/arrow/recordbatch.rs | 2 +- vortex-array/src/arrow/wrappers.rs | 2 +- vortex-array/src/canonical.rs | 17 ++++------ vortex-array/src/compute/boolean.rs | 2 +- vortex-array/src/compute/filter.rs | 3 +- vortex-array/src/context.rs | 13 +++---- vortex-array/src/iter/ext.rs | 2 +- vortex-array/src/stream/ext.rs | 2 +- vortex-array/src/tree.rs | 2 +- vortex-array/src/validity.rs | 2 +- vortex-datafusion/examples/table_provider.rs | 5 +-- vortex-datafusion/src/datatype.rs | 4 +-- vortex-datafusion/src/eval.rs | 2 +- vortex-datafusion/src/lib.rs | 2 +- vortex-datafusion/src/memory.rs | 6 ++-- vortex-datafusion/src/plans.rs | 7 ++-- .../src/compressors/alp.rs | 2 +- .../src/compressors/bitpacked.rs | 2 +- .../src/compressors/constant.rs | 2 +- .../src/compressors/date_time_parts.rs | 4 +-- .../src/compressors/delta.rs | 2 +- .../src/compressors/dict.rs | 3 +- .../src/compressors/for.rs | 2 +- .../src/compressors/runend.rs | 2 +- .../src/compressors/sparse.rs | 2 +- .../src/compressors/zigzag.rs | 2 +- vortex-sampling-compressor/src/lib.rs | 4 +-- vortex-sampling-compressor/tests/smoketest.rs | 7 ++-- vortex-serde/benches/ipc_array_reader_take.rs | 3 +- vortex-serde/benches/ipc_take.rs | 2 +- vortex-serde/src/chunked_reader/take_rows.rs | 6 ++-- vortex-serde/src/file/file_writer.rs | 7 ++-- vortex-serde/src/file/reader/batch.rs | 2 +- vortex-serde/src/file/reader/column.rs | 2 +- vortex-serde/src/file/reader/mod.rs | 3 +- vortex-serde/src/file/tests.rs | 5 +-- vortex-serde/src/lib.rs | 3 +- vortex-serde/src/writer.rs | 2 +- 102 files changed, 164 insertions(+), 212 deletions(-) diff --git a/bench-vortex/src/data_downloads.rs b/bench-vortex/src/data_downloads.rs index dc07b745f0..ace58af7ec 100644 --- a/bench-vortex/src/data_downloads.rs +++ b/bench-vortex/src/data_downloads.rs @@ -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; diff --git a/bench-vortex/src/lib.rs b/bench-vortex/src/lib.rs index fe2b91142e..0574ae341b 100644 --- a/bench-vortex/src/lib.rs +++ b/bench-vortex/src/lib.rs @@ -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; diff --git a/bench-vortex/src/reader.rs b/bench-vortex/src/reader.rs index 79a9f06889..9a3ccc16ae 100644 --- a/bench-vortex/src/reader.rs +++ b/bench-vortex/src/reader.rs @@ -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; diff --git a/bench-vortex/src/tpch/mod.rs b/bench-vortex/src/tpch/mod.rs index 8d2f061dac..f41ad05bd3 100644 --- a/bench-vortex/src/tpch/mod.rs +++ b/bench-vortex/src/tpch/mod.rs @@ -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; diff --git a/bench-vortex/src/vortex_utils.rs b/bench-vortex/src/vortex_utils.rs index 8e05d9baa3..925411d6a6 100644 --- a/bench-vortex/src/vortex_utils.rs +++ b/bench-vortex/src/vortex_utils.rs @@ -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; diff --git a/encodings/alp/src/array.rs b/encodings/alp/src/array.rs index 267a57bd5a..cfc648ba51 100644 --- a/encodings/alp/src/array.rs +++ b/encodings/alp/src/array.rs @@ -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}; diff --git a/encodings/alp/src/compress.rs b/encodings/alp/src/compress.rs index bda2cae993..c9265d2e58 100644 --- a/encodings/alp/src/compress.rs +++ b/encodings/alp/src/compress.rs @@ -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}; diff --git a/encodings/byte-bool/src/lib.rs b/encodings/byte-bool/src/lib.rs index 63a1cebc01..05e6c6e8b2 100644 --- a/encodings/byte-bool/src/lib.rs +++ b/encodings/byte-bool/src/lib.rs @@ -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}; diff --git a/encodings/datetime-parts/src/compress.rs b/encodings/datetime-parts/src/compress.rs index d06b4c7b7e..d582624ec2 100644 --- a/encodings/datetime-parts/src/compress.rs +++ b/encodings/datetime-parts/src/compress.rs @@ -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; diff --git a/encodings/datetime-parts/src/compute.rs b/encodings/datetime-parts/src/compute.rs index ad5a8d2153..48ce586527 100644 --- a/encodings/datetime-parts/src/compute.rs +++ b/encodings/datetime-parts/src/compute.rs @@ -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; @@ -120,8 +119,7 @@ pub fn decode_to_temporal(array: &DateTimePartsArray) -> VortexResult PyErr { diff --git a/vortex-array/benches/compare.rs b/vortex-array/benches/compare.rs index 5c3ca3d959..b8d7c35184 100644 --- a/vortex-array/benches/compare.rs +++ b/vortex-array/benches/compare.rs @@ -2,7 +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::bool::BoolArray; +use vortex::array::BoolArray; use vortex::IntoArray; use vortex_error::VortexError; use vortex_expr::Operator; diff --git a/vortex-array/benches/scalar_subtract.rs b/vortex-array/benches/scalar_subtract.rs index 2722d623a7..f6608f850e 100644 --- a/vortex-array/benches/scalar_subtract.rs +++ b/vortex-array/benches/scalar_subtract.rs @@ -2,7 +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::chunked::ChunkedArray; +use vortex::array::ChunkedArray; use vortex::IntoArray; use vortex_error::VortexError; diff --git a/vortex-array/src/array/bool/accessors.rs b/vortex-array/src/array/bool/accessors.rs index 5a904dadd3..b31906fdef 100644 --- a/vortex-array/src/array/bool/accessors.rs +++ b/vortex-array/src/array/bool/accessors.rs @@ -1,7 +1,7 @@ use vortex_error::VortexResult; use crate::accessor::ArrayAccessor; -use crate::array::bool::BoolArray; +use crate::array::BoolArray; use crate::validity::Validity; use crate::IntoArrayVariant; @@ -38,7 +38,7 @@ impl ArrayAccessor for BoolArray { #[cfg(test)] mod test { use crate::accessor::ArrayAccessor; - use crate::array::bool::BoolArray; + use crate::array::BoolArray; #[test] fn test_bool_accesor() { diff --git a/vortex-array/src/array/bool/compute/boolean.rs b/vortex-array/src/array/bool/compute/boolean.rs index 379f403fc0..8165b11089 100644 --- a/vortex-array/src/array/bool/compute/boolean.rs +++ b/vortex-array/src/array/bool/compute/boolean.rs @@ -2,7 +2,7 @@ use arrow_arith::boolean; use arrow_array::cast::AsArray as _; use vortex_error::VortexResult; -use crate::array::bool::BoolArray; +use crate::array::BoolArray; use crate::arrow::FromArrowArray; use crate::compute::{AndFn, OrFn}; use crate::{Array, ArrayData, IntoArray, IntoCanonical}; diff --git a/vortex-array/src/array/bool/compute/compare.rs b/vortex-array/src/array/bool/compute/compare.rs index 4754516ecc..f652186bda 100644 --- a/vortex-array/src/array/bool/compute/compare.rs +++ b/vortex-array/src/array/bool/compute/compare.rs @@ -3,7 +3,7 @@ use std::ops::{BitAnd, BitOr, BitXor, Not}; use vortex_error::VortexResult; use vortex_expr::Operator; -use crate::array::bool::BoolArray; +use crate::array::BoolArray; use crate::compute::CompareFn; use crate::{Array, IntoArray, IntoArrayVariant}; diff --git a/vortex-array/src/array/bool/compute/fill.rs b/vortex-array/src/array/bool/compute/fill.rs index 8442effbde..06c422d338 100644 --- a/vortex-array/src/array/bool/compute/fill.rs +++ b/vortex-array/src/array/bool/compute/fill.rs @@ -1,7 +1,7 @@ use vortex_dtype::Nullability; use vortex_error::VortexResult; -use crate::array::bool::BoolArray; +use crate::array::BoolArray; use crate::compute::unary::FillForwardFn; use crate::validity::ArrayValidity; use crate::{Array, ArrayDType, IntoArray, ToArrayData}; @@ -31,7 +31,7 @@ impl FillForwardFn for BoolArray { #[cfg(test)] mod test { - use crate::array::bool::BoolArray; + use crate::array::BoolArray; use crate::validity::Validity; use crate::{compute, IntoArray}; diff --git a/vortex-array/src/array/bool/compute/filter.rs b/vortex-array/src/array/bool/compute/filter.rs index aa37610445..1225bb645f 100644 --- a/vortex-array/src/array/bool/compute/filter.rs +++ b/vortex-array/src/array/bool/compute/filter.rs @@ -1,7 +1,7 @@ use arrow_buffer::{BooleanBuffer, BooleanBufferBuilder}; use vortex_error::{vortex_err, VortexResult}; -use crate::array::bool::BoolArray; +use crate::array::BoolArray; use crate::compute::FilterFn; use crate::validity::filter_validity; use crate::variants::BoolArrayTrait; @@ -61,7 +61,7 @@ mod test { use crate::array::bool::compute::filter::{ filter_select_bool, filter_select_bool_by_index, filter_select_bool_by_slice, }; - use crate::array::bool::BoolArray; + use crate::array::BoolArray; use crate::ToArray; #[test] diff --git a/vortex-array/src/array/bool/compute/mod.rs b/vortex-array/src/array/bool/compute/mod.rs index e442d03a98..813ae99b22 100644 --- a/vortex-array/src/array/bool/compute/mod.rs +++ b/vortex-array/src/array/bool/compute/mod.rs @@ -1,4 +1,4 @@ -use crate::array::bool::BoolArray; +use crate::array::BoolArray; use crate::compute::unary::{FillForwardFn, ScalarAtFn}; use crate::compute::{ArrayCompute, CompareFn, SliceFn, TakeFn}; diff --git a/vortex-array/src/array/bool/compute/scalar_at.rs b/vortex-array/src/array/bool/compute/scalar_at.rs index 2215d5dc32..ffea6bf52d 100644 --- a/vortex-array/src/array/bool/compute/scalar_at.rs +++ b/vortex-array/src/array/bool/compute/scalar_at.rs @@ -1,7 +1,7 @@ use vortex_error::VortexResult; use vortex_scalar::Scalar; -use crate::array::bool::BoolArray; +use crate::array::BoolArray; use crate::compute::unary::ScalarAtFn; use crate::validity::ArrayValidity; use crate::ArrayDType; diff --git a/vortex-array/src/array/bool/compute/slice.rs b/vortex-array/src/array/bool/compute/slice.rs index 6928f48679..8f3e70f491 100644 --- a/vortex-array/src/array/bool/compute/slice.rs +++ b/vortex-array/src/array/bool/compute/slice.rs @@ -1,6 +1,6 @@ use vortex_error::VortexResult; -use crate::array::bool::BoolArray; +use crate::array::BoolArray; use crate::compute::SliceFn; use crate::{Array, IntoArray}; diff --git a/vortex-array/src/array/bool/compute/take.rs b/vortex-array/src/array/bool/compute/take.rs index 3a0715d374..629ba20626 100644 --- a/vortex-array/src/array/bool/compute/take.rs +++ b/vortex-array/src/array/bool/compute/take.rs @@ -3,7 +3,7 @@ use num_traits::AsPrimitive; use vortex_dtype::match_each_integer_ptype; use vortex_error::VortexResult; -use crate::array::bool::BoolArray; +use crate::array::BoolArray; use crate::compute::TakeFn; use crate::{Array, AsArray, IntoArray, IntoArrayVariant}; @@ -26,8 +26,8 @@ fn take_bool>(bools: &BooleanBuffer, indices: &[I]) -> Vec #[cfg(test)] mod test { - use crate::array::bool::BoolArray; use crate::array::primitive::PrimitiveArray; + use crate::array::BoolArray; use crate::compute::take; use crate::IntoArray; diff --git a/vortex-array/src/array/bool/mod.rs b/vortex-array/src/array/bool/mod.rs index 57ff469c8b..e7fe02c371 100644 --- a/vortex-array/src/array/bool/mod.rs +++ b/vortex-array/src/array/bool/mod.rs @@ -150,7 +150,7 @@ impl AcceptArrayVisitor for BoolArray { mod tests { use itertools::Itertools; - use crate::array::bool::BoolArray; + use crate::array::BoolArray; use crate::compute::unary::scalar_at; use crate::variants::BoolArrayTrait; use crate::IntoArray; diff --git a/vortex-array/src/array/bool/stats.rs b/vortex-array/src/array/bool/stats.rs index 70b971c630..00553f5995 100644 --- a/vortex-array/src/array/bool/stats.rs +++ b/vortex-array/src/array/bool/stats.rs @@ -3,7 +3,7 @@ use std::collections::HashMap; use arrow_buffer::BooleanBuffer; use vortex_error::VortexResult; -use crate::array::bool::BoolArray; +use crate::array::BoolArray; use crate::stats::{ArrayStatisticsCompute, Stat, StatsSet}; use crate::validity::{ArrayValidity, LogicalValidity}; use crate::{ArrayDType, IntoArrayVariant}; @@ -134,7 +134,7 @@ mod test { use vortex_dtype::Nullability::Nullable; use vortex_scalar::Scalar; - use crate::array::bool::BoolArray; + use crate::array::BoolArray; use crate::stats::{ArrayStatistics, Stat}; #[test] diff --git a/vortex-array/src/array/chunked/canonical.rs b/vortex-array/src/array/chunked/canonical.rs index 2532077e7d..f5d90677b4 100644 --- a/vortex-array/src/array/chunked/canonical.rs +++ b/vortex-array/src/array/chunked/canonical.rs @@ -4,7 +4,6 @@ use vortex_dtype::{DType, Nullability, PType, StructDType}; use vortex_error::{vortex_bail, ErrString, VortexResult}; use crate::accessor::ArrayAccessor; -use crate::array::bool::BoolArray; use crate::array::chunked::ChunkedArray; use crate::array::extension::ExtensionArray; use crate::array::null::NullArray; @@ -12,6 +11,7 @@ use crate::array::primitive::PrimitiveArray; use crate::array::struct_::StructArray; use crate::array::varbin::builder::VarBinBuilder; use crate::array::varbin::VarBinArray; +use crate::array::BoolArray; use crate::validity::Validity; use crate::variants::StructArrayTrait; use crate::{ diff --git a/vortex-array/src/array/constant/canonical.rs b/vortex-array/src/array/constant/canonical.rs index 0e55173adc..b1a52e840d 100644 --- a/vortex-array/src/array/constant/canonical.rs +++ b/vortex-array/src/array/constant/canonical.rs @@ -4,10 +4,10 @@ use vortex_dtype::{match_each_native_ptype, DType, Nullability, PType}; use vortex_error::{vortex_bail, VortexResult}; use vortex_scalar::{BoolScalar, Utf8Scalar}; -use crate::array::bool::BoolArray; use crate::array::constant::ConstantArray; use crate::array::primitive::PrimitiveArray; use crate::array::varbin::VarBinArray; +use crate::array::BoolArray; use crate::validity::Validity; use crate::{ArrayDType, Canonical, IntoCanonical}; diff --git a/vortex-array/src/array/constant/compute.rs b/vortex-array/src/array/constant/compute.rs index 056c01a4c0..0b367c222c 100644 --- a/vortex-array/src/array/constant/compute.rs +++ b/vortex-array/src/array/constant/compute.rs @@ -175,8 +175,8 @@ fn constant_array_bool_impl( mod test { use rstest::rstest; - use crate::array::bool::BoolArray; use crate::array::constant::ConstantArray; + use crate::array::BoolArray; use crate::compute::unary::scalar_at; use crate::compute::{and, or, search_sorted, SearchResult, SearchSortedSide}; use crate::{Array, IntoArray, IntoArrayVariant}; diff --git a/vortex-array/src/array/mod.rs b/vortex-array/src/array/mod.rs index 31487ef3a5..d91350d73c 100644 --- a/vortex-array/src/array/mod.rs +++ b/vortex-array/src/array/mod.rs @@ -1,11 +1,23 @@ -pub mod bool; -pub mod chunked; -pub mod constant; -pub mod datetime; -pub mod extension; -pub mod null; -pub mod primitive; -pub mod sparse; -pub mod struct_; -pub mod varbin; -pub mod varbinview; +mod bool; +mod chunked; +mod constant; +mod datetime; +mod extension; +mod null; +mod primitive; +mod sparse; +mod struct_; +mod varbin; +mod varbinview; + +pub use self::bool::*; +pub use self::chunked::*; +pub use self::constant::*; +pub use self::datetime::{temporal, *}; +pub use self::extension::*; +pub use self::null::*; +pub use self::primitive::*; +pub use self::sparse::*; +pub use self::struct_::*; +pub use self::varbin::*; +pub use self::varbinview::*; diff --git a/vortex-array/src/array/primitive/compute/compare.rs b/vortex-array/src/array/primitive/compute/compare.rs index e6c497af22..4e91231672 100644 --- a/vortex-array/src/array/primitive/compute/compare.rs +++ b/vortex-array/src/array/primitive/compute/compare.rs @@ -5,8 +5,8 @@ use vortex_dtype::{match_each_native_ptype, NativePType}; use vortex_error::VortexResult; use vortex_expr::Operator; -use crate::array::bool::BoolArray; use crate::array::primitive::PrimitiveArray; +use crate::array::BoolArray; use crate::compute::CompareFn; use crate::{Array, IntoArray, IntoArrayVariant}; diff --git a/vortex-array/src/array/primitive/compute/fill.rs b/vortex-array/src/array/primitive/compute/fill.rs index 53cb162c3e..1fe8ec5061 100644 --- a/vortex-array/src/array/primitive/compute/fill.rs +++ b/vortex-array/src/array/primitive/compute/fill.rs @@ -32,8 +32,8 @@ impl FillForwardFn for PrimitiveArray { #[cfg(test)] mod test { - use crate::array::bool::BoolArray; use crate::array::primitive::PrimitiveArray; + use crate::array::BoolArray; use crate::compute::unary::fill_forward; use crate::validity::{ArrayValidity, Validity}; use crate::IntoArray; diff --git a/vortex-array/src/array/primitive/compute/filter.rs b/vortex-array/src/array/primitive/compute/filter.rs index de4c2ccb01..ba332a7c6f 100644 --- a/vortex-array/src/array/primitive/compute/filter.rs +++ b/vortex-array/src/array/primitive/compute/filter.rs @@ -51,9 +51,9 @@ pub fn filter_primitive_slice( mod test { use itertools::Itertools; - use crate::array::bool::BoolArray; use crate::array::primitive::compute::filter::filter_select_primitive; use crate::array::primitive::PrimitiveArray; + use crate::array::BoolArray; #[test] fn filter_run_variant_mixed_test() { diff --git a/vortex-array/src/array/primitive/compute/filter_indices.rs b/vortex-array/src/array/primitive/compute/filter_indices.rs index d20c4b795a..55e31fbe3e 100644 --- a/vortex-array/src/array/primitive/compute/filter_indices.rs +++ b/vortex-array/src/array/primitive/compute/filter_indices.rs @@ -5,8 +5,8 @@ use vortex_dtype::{match_each_native_ptype, NativePType}; use vortex_error::{vortex_bail, VortexResult}; use vortex_expr::{Disjunction, Predicate, Value}; -use crate::array::bool::BoolArray; use crate::array::primitive::PrimitiveArray; +use crate::array::BoolArray; use crate::compute::FilterIndicesFn; use crate::{Array, IntoArray}; diff --git a/vortex-array/src/array/sparse/flatten.rs b/vortex-array/src/array/sparse/flatten.rs index 00b7bcc8e5..73d146e8c4 100644 --- a/vortex-array/src/array/sparse/flatten.rs +++ b/vortex-array/src/array/sparse/flatten.rs @@ -4,9 +4,9 @@ use vortex_dtype::{match_each_native_ptype, DType, NativePType}; use vortex_error::{VortexError, VortexResult}; use vortex_scalar::Scalar; -use crate::array::bool::BoolArray; use crate::array::primitive::PrimitiveArray; use crate::array::sparse::SparseArray; +use crate::array::BoolArray; use crate::validity::Validity; use crate::{ArrayDType, Canonical, IntoArrayVariant, IntoCanonical}; @@ -94,8 +94,8 @@ fn canonicalize_sparse_primitives< mod test { use vortex_dtype::{DType, Nullability}; - use crate::array::bool::BoolArray; use crate::array::sparse::SparseArray; + use crate::array::BoolArray; use crate::validity::Validity; use crate::{ArrayDType, Canonical, IntoArray, IntoCanonical}; diff --git a/vortex-array/src/array/struct_/mod.rs b/vortex-array/src/array/struct_/mod.rs index c8c04406d9..3ed68f9e08 100644 --- a/vortex-array/src/array/struct_/mod.rs +++ b/vortex-array/src/array/struct_/mod.rs @@ -163,10 +163,10 @@ impl ArrayStatisticsCompute for StructArray {} mod test { use vortex_dtype::{DType, FieldName, FieldNames, Nullability}; - use crate::array::bool::BoolArray; use crate::array::primitive::PrimitiveArray; use crate::array::struct_::StructArray; use crate::array::varbin::VarBinArray; + use crate::array::BoolArray; use crate::validity::Validity; use crate::variants::StructArrayTrait; use crate::IntoArray; diff --git a/vortex-array/src/array/varbin/compute/filter.rs b/vortex-array/src/array/varbin/compute/filter.rs index ea89d554c6..d0db9c85ab 100644 --- a/vortex-array/src/array/varbin/compute/filter.rs +++ b/vortex-array/src/array/varbin/compute/filter.rs @@ -165,12 +165,12 @@ mod test { use vortex_dtype::Nullability::{NonNullable, Nullable}; use vortex_scalar::Scalar; - use crate::array::bool::BoolArray; use crate::array::primitive::PrimitiveArray; use crate::array::varbin::compute::filter::{ filter_select_var_bin_by_index, filter_select_var_bin_by_slice, }; use crate::array::varbin::VarBinArray; + use crate::array::BoolArray; use crate::compute::unary::scalar_at; use crate::validity::Validity; use crate::ToArray; diff --git a/vortex-array/src/arrow/array.rs b/vortex-array/src/arrow/array.rs index 6307ba6632..3902cfc5ad 100644 --- a/vortex-array/src/arrow/array.rs +++ b/vortex-array/src/arrow/array.rs @@ -19,14 +19,10 @@ use arrow_schema::{DataType, TimeUnit as ArrowTimeUnit}; use itertools::Itertools; use vortex_dtype::{DType, NativePType, PType}; -use crate::array::bool::BoolArray; -use crate::array::datetime::temporal::TemporalArray; -use crate::array::datetime::TimeUnit; -use crate::array::null::NullArray; -use crate::array::primitive::PrimitiveArray; -use crate::array::struct_::StructArray; -use crate::array::varbin::VarBinArray; -use crate::array::varbinview::VarBinViewArray; +use crate::array::temporal::TemporalArray; +use crate::array::{ + BoolArray, NullArray, PrimitiveArray, StructArray, TimeUnit, VarBinArray, VarBinViewArray, +}; use crate::arrow::FromArrowArray; use crate::stats::{Stat, Statistics}; use crate::validity::Validity; diff --git a/vortex-array/src/arrow/dtype.rs b/vortex-array/src/arrow/dtype.rs index 4392901632..554ec59a17 100644 --- a/vortex-array/src/arrow/dtype.rs +++ b/vortex-array/src/arrow/dtype.rs @@ -5,7 +5,7 @@ use itertools::Itertools; use vortex_dtype::{DType, Nullability, PType, StructDType}; use vortex_error::{vortex_err, VortexResult}; -use crate::array::datetime::{make_temporal_ext_dtype, TimeUnit}; +use crate::array::{make_temporal_ext_dtype, TimeUnit}; use crate::arrow::{FromArrowType, TryFromArrowType}; impl TryFromArrowType<&DataType> for PType { diff --git a/vortex-array/src/arrow/recordbatch.rs b/vortex-array/src/arrow/recordbatch.rs index 5845f66fef..d0b1c9b16a 100644 --- a/vortex-array/src/arrow/recordbatch.rs +++ b/vortex-array/src/arrow/recordbatch.rs @@ -1,7 +1,7 @@ use arrow_array::RecordBatch; use itertools::Itertools; -use crate::array::struct_::StructArray; +use crate::array::StructArray; use crate::arrow::FromArrowArray; use crate::validity::Validity; use crate::{ArrayData, IntoArray, IntoArrayData, ToArrayData}; diff --git a/vortex-array/src/arrow/wrappers.rs b/vortex-array/src/arrow/wrappers.rs index 39c3c00bc9..d5053e9192 100644 --- a/vortex-array/src/arrow/wrappers.rs +++ b/vortex-array/src/arrow/wrappers.rs @@ -1,7 +1,7 @@ use arrow_buffer::{ArrowNativeType, OffsetBuffer, ScalarBuffer}; use vortex_dtype::NativePType; -use crate::array::primitive::PrimitiveArray; +use crate::array::PrimitiveArray; pub fn as_scalar_buffer( array: PrimitiveArray, diff --git a/vortex-array/src/canonical.rs b/vortex-array/src/canonical.rs index 1b122e6465..3e27d1b6ef 100644 --- a/vortex-array/src/canonical.rs +++ b/vortex-array/src/canonical.rs @@ -17,14 +17,11 @@ use arrow_schema::{Field, Fields}; use vortex_dtype::{DType, NativePType, PType}; use vortex_error::{vortex_bail, VortexResult}; -use crate::array::bool::BoolArray; -use crate::array::datetime::temporal::{is_temporal_ext_type, TemporalMetadata}; -use crate::array::datetime::{TemporalArray, TimeUnit}; -use crate::array::extension::ExtensionArray; -use crate::array::null::NullArray; -use crate::array::primitive::PrimitiveArray; -use crate::array::struct_::StructArray; -use crate::array::varbin::VarBinArray; +use crate::array::temporal::{is_temporal_ext_type, TemporalMetadata}; +use crate::array::{ + BoolArray, ExtensionArray, NullArray, PrimitiveArray, StructArray, TemporalArray, TimeUnit, + VarBinArray, +}; use crate::arrow::wrappers::as_offset_buffer; use crate::compute::unary::try_cast; use crate::encoding::ArrayEncoding; @@ -452,9 +449,7 @@ mod test { use vortex_dtype::Nullability; use vortex_scalar::Scalar; - use crate::array::primitive::PrimitiveArray; - use crate::array::sparse::SparseArray; - use crate::array::struct_::StructArray; + use crate::array::{PrimitiveArray, SparseArray, StructArray}; use crate::validity::Validity; use crate::{IntoArray, IntoCanonical}; diff --git a/vortex-array/src/compute/boolean.rs b/vortex-array/src/compute/boolean.rs index d104349f32..1467955cad 100644 --- a/vortex-array/src/compute/boolean.rs +++ b/vortex-array/src/compute/boolean.rs @@ -61,7 +61,7 @@ mod tests { use rstest::rstest; use super::*; - use crate::array::bool::BoolArray; + use crate::array::BoolArray; use crate::compute::unary::scalar_at; use crate::IntoArray; diff --git a/vortex-array/src/compute/filter.rs b/vortex-array/src/compute/filter.rs index 230ae3f609..59de8cd355 100644 --- a/vortex-array/src/compute/filter.rs +++ b/vortex-array/src/compute/filter.rs @@ -49,8 +49,7 @@ pub fn filter(array: &Array, predicate: &Array) -> VortexResult { #[cfg(test)] mod test { - use crate::array::bool::BoolArray; - use crate::array::primitive::PrimitiveArray; + use crate::array::{BoolArray, PrimitiveArray}; use crate::compute::filter::filter; use crate::validity::Validity; use crate::{IntoArray, IntoCanonical}; diff --git a/vortex-array/src/context.rs b/vortex-array/src/context.rs index 50b13c7b90..41a8f44081 100644 --- a/vortex-array/src/context.rs +++ b/vortex-array/src/context.rs @@ -1,14 +1,9 @@ use std::collections::HashMap; -use crate::array::bool::BoolEncoding; -use crate::array::chunked::ChunkedEncoding; -use crate::array::constant::ConstantEncoding; -use crate::array::extension::ExtensionEncoding; -use crate::array::primitive::PrimitiveEncoding; -use crate::array::sparse::SparseEncoding; -use crate::array::struct_::StructEncoding; -use crate::array::varbin::VarBinEncoding; -use crate::array::varbinview::VarBinViewEncoding; +use crate::array::{ + BoolEncoding, ChunkedEncoding, ConstantEncoding, ExtensionEncoding, PrimitiveEncoding, + SparseEncoding, StructEncoding, VarBinEncoding, VarBinViewEncoding, +}; use crate::encoding::EncodingRef; #[derive(Debug, Clone)] diff --git a/vortex-array/src/iter/ext.rs b/vortex-array/src/iter/ext.rs index 3bb8293260..919b1b30af 100644 --- a/vortex-array/src/iter/ext.rs +++ b/vortex-array/src/iter/ext.rs @@ -1,7 +1,7 @@ use itertools::Itertools; use vortex_error::VortexResult; -use crate::array::chunked::ChunkedArray; +use crate::array::ChunkedArray; use crate::iter::ArrayIterator; use crate::stream::{ArrayStream, ArrayStreamAdapter}; diff --git a/vortex-array/src/stream/ext.rs b/vortex-array/src/stream/ext.rs index 2938e06b12..7f5008b3d1 100644 --- a/vortex-array/src/stream/ext.rs +++ b/vortex-array/src/stream/ext.rs @@ -3,7 +3,7 @@ use std::future::Future; use futures_util::TryStreamExt; use vortex_error::VortexResult; -use crate::array::chunked::ChunkedArray; +use crate::array::ChunkedArray; use crate::stream::take_rows::TakeRows; use crate::stream::{ArrayStream, ArrayStreamAdapter}; use crate::Array; diff --git a/vortex-array/src/tree.rs b/vortex-array/src/tree.rs index 52c6447694..5fdf087a55 100644 --- a/vortex-array/src/tree.rs +++ b/vortex-array/src/tree.rs @@ -5,7 +5,7 @@ use serde::ser::Error; use vortex_buffer::Buffer; use vortex_error::{VortexError, VortexResult}; -use crate::array::chunked::ChunkedArray; +use crate::array::ChunkedArray; use crate::visitor::ArrayVisitor; use crate::{Array, ToArrayData}; diff --git a/vortex-array/src/validity.rs b/vortex-array/src/validity.rs index 741745b515..b6157995d3 100644 --- a/vortex-array/src/validity.rs +++ b/vortex-array/src/validity.rs @@ -3,7 +3,7 @@ use serde::{Deserialize, Serialize}; use vortex_dtype::{DType, Nullability}; use vortex_error::{vortex_bail, VortexResult}; -use crate::array::bool::BoolArray; +use crate::array::BoolArray; use crate::compute::unary::scalar_at; use crate::compute::{filter, slice, take}; use crate::stats::ArrayStatistics; diff --git a/vortex-datafusion/examples/table_provider.rs b/vortex-datafusion/examples/table_provider.rs index 88e4aeee3e..14ed9b4cc0 100644 --- a/vortex-datafusion/examples/table_provider.rs +++ b/vortex-datafusion/examples/table_provider.rs @@ -9,10 +9,7 @@ use object_store::ObjectStore; use tempfile::tempdir; use tokio::fs::OpenOptions; use url::Url; -use vortex::array::chunked::ChunkedArray; -use vortex::array::primitive::PrimitiveArray; -use vortex::array::struct_::StructArray; -use vortex::array::varbin::VarBinArray; +use vortex::array::{ChunkedArray, PrimitiveArray, StructArray, VarBinArray}; use vortex::validity::Validity; use vortex::IntoArray; use vortex_datafusion::persistent::config::{VortexFile, VortexTableConfig}; diff --git a/vortex-datafusion/src/datatype.rs b/vortex-datafusion/src/datatype.rs index 0a04e4e875..7ed6599176 100644 --- a/vortex-datafusion/src/datatype.rs +++ b/vortex-datafusion/src/datatype.rs @@ -15,8 +15,8 @@ use std::sync::Arc; use arrow_schema::{ DataType, Field, FieldRef, Fields, Schema, SchemaBuilder, TimeUnit as ArrowTimeUnit, }; -use vortex::array::datetime::temporal::TemporalMetadata; -use vortex::array::datetime::TimeUnit; +use vortex::array::temporal::TemporalMetadata; +use vortex::array::TimeUnit; use vortex_dtype::{DType, Nullability, PType}; /// Convert a Vortex [struct DType][DType] to an Arrow [Schema]. diff --git a/vortex-datafusion/src/eval.rs b/vortex-datafusion/src/eval.rs index 187a33c423..49034f92b2 100644 --- a/vortex-datafusion/src/eval.rs +++ b/vortex-datafusion/src/eval.rs @@ -1,5 +1,5 @@ use datafusion_expr::{Expr, Operator as DFOperator}; -use vortex::array::constant::ConstantArray; +use vortex::array::ConstantArray; use vortex::compute::{and, compare, or}; use vortex::{Array, IntoArray}; use vortex_error::{vortex_bail, vortex_err, VortexResult}; diff --git a/vortex-datafusion/src/lib.rs b/vortex-datafusion/src/lib.rs index fee7fdf6ca..0c29b47794 100644 --- a/vortex-datafusion/src/lib.rs +++ b/vortex-datafusion/src/lib.rs @@ -20,7 +20,7 @@ use datafusion_physical_plan::{DisplayAs, DisplayFormatType, ExecutionPlan, Plan use futures::Stream; use itertools::Itertools; use memory::{VortexMemTable, VortexMemTableOptions}; -use vortex::array::chunked::ChunkedArray; +use vortex::array::ChunkedArray; use vortex::{Array, ArrayDType, IntoArrayVariant, IntoCanonical}; pub mod memory; diff --git a/vortex-datafusion/src/memory.rs b/vortex-datafusion/src/memory.rs index abe924c873..47fc413730 100644 --- a/vortex-datafusion/src/memory.rs +++ b/vortex-datafusion/src/memory.rs @@ -11,7 +11,7 @@ use datafusion_expr::{TableProviderFilterPushDown, TableType}; use datafusion_physical_expr::EquivalenceProperties; use datafusion_physical_plan::{ExecutionMode, ExecutionPlan, Partitioning, PlanProperties}; use itertools::Itertools; -use vortex::array::chunked::ChunkedArray; +use vortex::array::ChunkedArray; use vortex::{Array, ArrayDType as _}; use vortex_dtype::DType; @@ -272,9 +272,7 @@ mod test { use datafusion::prelude::SessionContext; use datafusion_common::{Column, TableReference}; use datafusion_expr::{and, col, lit, BinaryExpr, Expr, Operator}; - use vortex::array::primitive::PrimitiveArray; - use vortex::array::struct_::StructArray; - use vortex::array::varbin::VarBinArray; + use vortex::array::{PrimitiveArray, StructArray, VarBinArray}; use vortex::validity::Validity; use vortex::{Array, IntoArray}; use vortex_dtype::{DType, Nullability}; diff --git a/vortex-datafusion/src/plans.rs b/vortex-datafusion/src/plans.rs index 5ac038a2e1..333fe48dd2 100644 --- a/vortex-datafusion/src/plans.rs +++ b/vortex-datafusion/src/plans.rs @@ -20,7 +20,7 @@ use datafusion_physical_plan::{ use futures::{ready, Stream}; use lazy_static::lazy_static; use pin_project::pin_project; -use vortex::array::chunked::ChunkedArray; +use vortex::array::ChunkedArray; use vortex::arrow::FromArrowArray; use vortex::compute::take; use vortex::{ArrayDType, ArrayData, IntoArray, IntoArrayVariant, IntoCanonical}; @@ -403,10 +403,7 @@ mod test { use arrow_array::{RecordBatch, UInt64Array}; use datafusion_expr::{and, col, lit}; use itertools::Itertools; - use vortex::array::bool::BoolArray; - use vortex::array::chunked::ChunkedArray; - use vortex::array::primitive::PrimitiveArray; - use vortex::array::struct_::StructArray; + use vortex::array::{BoolArray, ChunkedArray, PrimitiveArray, StructArray}; use vortex::validity::Validity; use vortex::{ArrayDType, IntoArray}; use vortex_dtype::FieldName; diff --git a/vortex-sampling-compressor/src/compressors/alp.rs b/vortex-sampling-compressor/src/compressors/alp.rs index 806d0bf5b7..ead9077980 100644 --- a/vortex-sampling-compressor/src/compressors/alp.rs +++ b/vortex-sampling-compressor/src/compressors/alp.rs @@ -1,4 +1,4 @@ -use vortex::array::primitive::PrimitiveArray; +use vortex::array::PrimitiveArray; use vortex::{Array, ArrayDef, IntoArray}; use vortex_alp::{alp_encode_components, match_each_alp_float_ptype, ALPArray, ALP}; use vortex_dtype::PType; diff --git a/vortex-sampling-compressor/src/compressors/bitpacked.rs b/vortex-sampling-compressor/src/compressors/bitpacked.rs index 4c5e9461f6..25bd37ed0c 100644 --- a/vortex-sampling-compressor/src/compressors/bitpacked.rs +++ b/vortex-sampling-compressor/src/compressors/bitpacked.rs @@ -1,4 +1,4 @@ -use vortex::array::primitive::PrimitiveArray; +use vortex::array::PrimitiveArray; use vortex::stats::ArrayStatistics; use vortex::{Array, ArrayDef, IntoArray}; use vortex_error::{vortex_err, VortexResult}; diff --git a/vortex-sampling-compressor/src/compressors/constant.rs b/vortex-sampling-compressor/src/compressors/constant.rs index 88516a9f32..7dd2290ccb 100644 --- a/vortex-sampling-compressor/src/compressors/constant.rs +++ b/vortex-sampling-compressor/src/compressors/constant.rs @@ -1,4 +1,4 @@ -use vortex::array::constant::{Constant, ConstantArray}; +use vortex::array::{Constant, ConstantArray}; use vortex::compute::unary::scalar_at; use vortex::stats::ArrayStatistics; use vortex::{Array, ArrayDef, IntoArray}; diff --git a/vortex-sampling-compressor/src/compressors/date_time_parts.rs b/vortex-sampling-compressor/src/compressors/date_time_parts.rs index 2f02b773b4..6cf2da991a 100644 --- a/vortex-sampling-compressor/src/compressors/date_time_parts.rs +++ b/vortex-sampling-compressor/src/compressors/date_time_parts.rs @@ -1,5 +1,5 @@ -use vortex::array::datetime::temporal::TemporalMetadata; -use vortex::array::datetime::TemporalArray; +use vortex::array::temporal::TemporalMetadata; +use vortex::array::TemporalArray; use vortex::{Array, ArrayDType, ArrayDef, IntoArray}; use vortex_datetime_parts::{compress_temporal, DateTimeParts, DateTimePartsArray}; use vortex_error::VortexResult; diff --git a/vortex-sampling-compressor/src/compressors/delta.rs b/vortex-sampling-compressor/src/compressors/delta.rs index 507c74703e..4e1f2eb6ec 100644 --- a/vortex-sampling-compressor/src/compressors/delta.rs +++ b/vortex-sampling-compressor/src/compressors/delta.rs @@ -1,4 +1,4 @@ -use vortex::array::primitive::PrimitiveArray; +use vortex::array::PrimitiveArray; use vortex::{Array, ArrayDef, IntoArray}; use vortex_error::VortexResult; use vortex_fastlanes::{delta_compress, Delta, DeltaArray}; diff --git a/vortex-sampling-compressor/src/compressors/dict.rs b/vortex-sampling-compressor/src/compressors/dict.rs index 01d29a88fd..cc936ef0a9 100644 --- a/vortex-sampling-compressor/src/compressors/dict.rs +++ b/vortex-sampling-compressor/src/compressors/dict.rs @@ -1,5 +1,4 @@ -use vortex::array::primitive::{Primitive, PrimitiveArray}; -use vortex::array::varbin::{VarBin, VarBinArray}; +use vortex::array::{Primitive, PrimitiveArray, VarBin, VarBinArray}; use vortex::stats::ArrayStatistics; use vortex::{Array, ArrayDef, IntoArray}; use vortex_dict::{dict_encode_primitive, dict_encode_varbin, Dict, DictArray}; diff --git a/vortex-sampling-compressor/src/compressors/for.rs b/vortex-sampling-compressor/src/compressors/for.rs index d40a682a91..4b14086cc5 100644 --- a/vortex-sampling-compressor/src/compressors/for.rs +++ b/vortex-sampling-compressor/src/compressors/for.rs @@ -1,4 +1,4 @@ -use vortex::array::primitive::PrimitiveArray; +use vortex::array::PrimitiveArray; use vortex::stats::{trailing_zeros, ArrayStatistics}; use vortex::validity::ArrayValidity; use vortex::{Array, ArrayDef, IntoArray}; diff --git a/vortex-sampling-compressor/src/compressors/runend.rs b/vortex-sampling-compressor/src/compressors/runend.rs index 355e78a575..6a30c8bf1c 100644 --- a/vortex-sampling-compressor/src/compressors/runend.rs +++ b/vortex-sampling-compressor/src/compressors/runend.rs @@ -1,4 +1,4 @@ -use vortex::array::primitive::Primitive; +use vortex::array::Primitive; use vortex::stats::ArrayStatistics; use vortex::{Array, ArrayDef, IntoArray}; use vortex_error::VortexResult; diff --git a/vortex-sampling-compressor/src/compressors/sparse.rs b/vortex-sampling-compressor/src/compressors/sparse.rs index 7c099d15f1..1e562a588a 100644 --- a/vortex-sampling-compressor/src/compressors/sparse.rs +++ b/vortex-sampling-compressor/src/compressors/sparse.rs @@ -1,4 +1,4 @@ -use vortex::array::sparse::{Sparse, SparseArray}; +use vortex::array::{Sparse, SparseArray}; use vortex::{Array, ArrayDef, IntoArray}; use vortex_error::VortexResult; diff --git a/vortex-sampling-compressor/src/compressors/zigzag.rs b/vortex-sampling-compressor/src/compressors/zigzag.rs index 1036c8b7a5..f2b92a3883 100644 --- a/vortex-sampling-compressor/src/compressors/zigzag.rs +++ b/vortex-sampling-compressor/src/compressors/zigzag.rs @@ -1,4 +1,4 @@ -use vortex::array::primitive::PrimitiveArray; +use vortex::array::PrimitiveArray; use vortex::stats::{ArrayStatistics, Stat}; use vortex::{Array, ArrayDef, IntoArray}; use vortex_error::VortexResult; diff --git a/vortex-sampling-compressor/src/lib.rs b/vortex-sampling-compressor/src/lib.rs index 7fdd66ca13..229edb7332 100644 --- a/vortex-sampling-compressor/src/lib.rs +++ b/vortex-sampling-compressor/src/lib.rs @@ -2,9 +2,7 @@ use std::collections::HashSet; use std::fmt::{Debug, Display, Formatter}; use log::{debug, info, warn}; -use vortex::array::chunked::{Chunked, ChunkedArray}; -use vortex::array::constant::Constant; -use vortex::array::struct_::{Struct, StructArray}; +use vortex::array::{Chunked, ChunkedArray, Constant, Struct, StructArray}; use vortex::compress::{check_dtype_unchanged, check_validity_unchanged, CompressionStrategy}; use vortex::compute::slice; use vortex::validity::Validity; diff --git a/vortex-sampling-compressor/tests/smoketest.rs b/vortex-sampling-compressor/tests/smoketest.rs index fe21044485..443ee0f879 100644 --- a/vortex-sampling-compressor/tests/smoketest.rs +++ b/vortex-sampling-compressor/tests/smoketest.rs @@ -2,11 +2,8 @@ use std::collections::HashSet; use std::ops::Add; use chrono::TimeDelta; -use vortex::array::bool::BoolArray; -use vortex::array::datetime::{TemporalArray, TimeUnit}; -use vortex::array::primitive::PrimitiveArray; -use vortex::array::struct_::StructArray; -use vortex::array::varbin::builder::VarBinBuilder; +use vortex::array::builder::VarBinBuilder; +use vortex::array::{BoolArray, PrimitiveArray, StructArray, TemporalArray, TimeUnit}; use vortex::validity::Validity; use vortex::{Array, ArrayDType, IntoArray, IntoArrayData}; use vortex_dtype::{DType, FieldName, FieldNames, Nullability}; diff --git a/vortex-serde/benches/ipc_array_reader_take.rs b/vortex-serde/benches/ipc_array_reader_take.rs index 28f6ed9c5f..98c3594807 100644 --- a/vortex-serde/benches/ipc_array_reader_take.rs +++ b/vortex-serde/benches/ipc_array_reader_take.rs @@ -5,8 +5,7 @@ use criterion::{black_box, criterion_group, criterion_main, Criterion}; use futures_executor::block_on; use futures_util::{pin_mut, TryStreamExt}; use itertools::Itertools; -use vortex::array::chunked::ChunkedArray; -use vortex::array::primitive::PrimitiveArray; +use vortex::array::{ChunkedArray, PrimitiveArray}; use vortex::stream::ArrayStreamExt; use vortex::validity::Validity; use vortex::{Context, IntoArray}; diff --git a/vortex-serde/benches/ipc_take.rs b/vortex-serde/benches/ipc_take.rs index 2b0cb8cc4d..fc107f3946 100644 --- a/vortex-serde/benches/ipc_take.rs +++ b/vortex-serde/benches/ipc_take.rs @@ -11,7 +11,7 @@ use futures_executor::block_on; use futures_util::io::Cursor; use futures_util::{pin_mut, TryStreamExt}; use itertools::Itertools; -use vortex::array::primitive::PrimitiveArray; +use vortex::array::PrimitiveArray; use vortex::compress::CompressionStrategy; use vortex::compute::take; use vortex::{Context, IntoArray}; diff --git a/vortex-serde/src/chunked_reader/take_rows.rs b/vortex-serde/src/chunked_reader/take_rows.rs index 40a62b1493..51088333f8 100644 --- a/vortex-serde/src/chunked_reader/take_rows.rs +++ b/vortex-serde/src/chunked_reader/take_rows.rs @@ -4,8 +4,7 @@ use std::ops::Range; use bytes::BytesMut; use futures_util::{stream, StreamExt, TryStreamExt}; use itertools::Itertools; -use vortex::array::chunked::ChunkedArray; -use vortex::array::primitive::PrimitiveArray; +use vortex::array::{ChunkedArray, PrimitiveArray}; use vortex::compute::unary::{subtract_scalar, try_cast}; use vortex::compute::{search_sorted, slice, take, SearchResult, SearchSortedSide}; use vortex::stats::ArrayStatistics; @@ -208,8 +207,7 @@ mod test { use futures_executor::block_on; use itertools::Itertools; - use vortex::array::chunked::ChunkedArray; - use vortex::array::primitive::PrimitiveArray; + use vortex::array::{ChunkedArray, PrimitiveArray}; use vortex::{Context, IntoArray, IntoArrayVariant}; use vortex_buffer::Buffer; use vortex_dtype::PType; diff --git a/vortex-serde/src/file/file_writer.rs b/vortex-serde/src/file/file_writer.rs index fda2091db8..e95cc592a8 100644 --- a/vortex-serde/src/file/file_writer.rs +++ b/vortex-serde/src/file/file_writer.rs @@ -4,8 +4,7 @@ use std::mem; use flatbuffers::{FlatBufferBuilder, WIPOffset}; use futures::{Stream, TryStreamExt}; use itertools::Itertools; -use vortex::array::chunked::ChunkedArray; -use vortex::array::struct_::StructArray; +use vortex::array::{ChunkedArray, StructArray}; use vortex::stream::ArrayStream; use vortex::validity::Validity; use vortex::{Array, ArrayDType, IntoArray}; @@ -264,9 +263,7 @@ impl FileWriter { #[cfg(test)] mod tests { use futures_executor::block_on; - use vortex::array::primitive::PrimitiveArray; - use vortex::array::struct_::StructArray; - use vortex::array::varbin::VarBinArray; + use vortex::array::{PrimitiveArray, StructArray, VarBinArray}; use vortex::validity::Validity; use vortex::IntoArray; diff --git a/vortex-serde/src/file/reader/batch.rs b/vortex-serde/src/file/reader/batch.rs index 73030836f4..1b0074c486 100644 --- a/vortex-serde/src/file/reader/batch.rs +++ b/vortex-serde/src/file/reader/batch.rs @@ -1,7 +1,7 @@ use std::collections::VecDeque; use std::sync::Arc; -use vortex::array::struct_::StructArray; +use vortex::array::StructArray; use vortex::{Array, Context, IntoArray}; use vortex_dtype::DType; use vortex_error::VortexResult; diff --git a/vortex-serde/src/file/reader/column.rs b/vortex-serde/src/file/reader/column.rs index e14c8545b5..f53d5ba5ca 100644 --- a/vortex-serde/src/file/reader/column.rs +++ b/vortex-serde/src/file/reader/column.rs @@ -2,7 +2,7 @@ use std::collections::VecDeque; use std::sync::Arc; use bytes::{Bytes, BytesMut}; -use vortex::array::chunked::ChunkedArray; +use vortex::array::ChunkedArray; use vortex::compute::slice; use vortex::{Array, Context, IntoArray}; use vortex_dtype::DType; diff --git a/vortex-serde/src/file/reader/mod.rs b/vortex-serde/src/file/reader/mod.rs index 618e3ee06f..ece71e7973 100644 --- a/vortex-serde/src/file/reader/mod.rs +++ b/vortex-serde/src/file/reader/mod.rs @@ -9,8 +9,7 @@ use futures::future::BoxFuture; use futures::{ready, FutureExt, Stream}; use projections::Projection; use schema::Schema; -use vortex::array::constant::ConstantArray; -use vortex::array::struct_::StructArray; +use vortex::array::{ConstantArray, StructArray}; use vortex::compute::unary::subtract_scalar; use vortex::compute::{and, filter, search_sorted, slice, take, SearchSortedSide}; use vortex::{Array, ArrayDType, IntoArray, IntoArrayVariant}; diff --git a/vortex-serde/src/file/tests.rs b/vortex-serde/src/file/tests.rs index dc25c184ca..a7e3e739f4 100644 --- a/vortex-serde/src/file/tests.rs +++ b/vortex-serde/src/file/tests.rs @@ -1,8 +1,5 @@ use futures::StreamExt; -use vortex::array::chunked::ChunkedArray; -use vortex::array::primitive::PrimitiveArray; -use vortex::array::struct_::StructArray; -use vortex::array::varbin::VarBinArray; +use vortex::array::{ChunkedArray, PrimitiveArray, StructArray, VarBinArray}; use vortex::validity::Validity; use vortex::variants::StructArrayTrait; use vortex::{ArrayDType, IntoArray, IntoArrayVariant}; diff --git a/vortex-serde/src/lib.rs b/vortex-serde/src/lib.rs index c3ff781f76..d3bcb2593c 100644 --- a/vortex-serde/src/lib.rs +++ b/vortex-serde/src/lib.rs @@ -56,8 +56,7 @@ mod test { use futures_util::io::Cursor; use futures_util::{pin_mut, StreamExt, TryStreamExt}; use itertools::Itertools; - use vortex::array::chunked::ChunkedArray; - use vortex::array::primitive::{PrimitiveArray, PrimitiveEncoding}; + use vortex::array::{ChunkedArray, PrimitiveArray, PrimitiveEncoding}; use vortex::encoding::ArrayEncoding; use vortex::stream::ArrayStreamExt; use vortex::{ArrayDType, Context, IntoArray}; diff --git a/vortex-serde/src/writer.rs b/vortex-serde/src/writer.rs index 9280a6d9c6..9de780c400 100644 --- a/vortex-serde/src/writer.rs +++ b/vortex-serde/src/writer.rs @@ -1,5 +1,5 @@ use futures_util::{Stream, TryStreamExt}; -use vortex::array::chunked::ChunkedArray; +use vortex::array::ChunkedArray; use vortex::stream::ArrayStream; use vortex::Array; use vortex_buffer::Buffer;