From e845b4cdabf0141471b9361c1bd8da5cbfc26ee2 Mon Sep 17 00:00:00 2001 From: Nicholas Gates Date: Mon, 29 Apr 2024 20:53:05 +0100 Subject: [PATCH] Vortex Schema -> Vortex DType (#273) I'm sorry... it had to be done --- Cargo.lock | 54 +++++++++---------- Cargo.toml | 2 +- bench-vortex/Cargo.toml | 2 +- bench-vortex/src/data_downloads.rs | 2 +- bench-vortex/src/lib.rs | 2 +- bench-vortex/src/parquet_utils.rs | 2 +- bench-vortex/src/reader.rs | 2 +- bench-vortex/src/vortex_utils.rs | 2 +- pyvortex/Cargo.toml | 2 +- pyvortex/src/dtype.rs | 2 +- pyvortex/src/encode.rs | 2 +- pyvortex/src/lib.rs | 4 +- vortex-alp/Cargo.toml | 2 +- vortex-alp/src/array.rs | 2 +- vortex-array/Cargo.toml | 2 +- vortex-array/flatbuffers/scalar.fbs | 2 +- vortex-array/src/array/bool/compute/fill.rs | 2 +- vortex-array/src/array/chunked/mod.rs | 4 +- vortex-array/src/array/composite/array.rs | 4 +- vortex-array/src/array/composite/mod.rs | 2 +- vortex-array/src/array/composite/typed.rs | 6 +-- vortex-array/src/array/constant/flatten.rs | 2 +- vortex-array/src/array/constant/stats.rs | 2 +- .../src/array/primitive/compute/cast.rs | 2 +- vortex-array/src/array/sparse/compute/mod.rs | 2 +- vortex-array/src/array/sparse/mod.rs | 6 +-- vortex-array/src/array/struct/mod.rs | 2 +- vortex-array/src/array/varbin/builder.rs | 6 +-- vortex-array/src/array/varbin/compute/mod.rs | 2 +- vortex-array/src/array/varbin/compute/take.rs | 2 +- vortex-array/src/array/varbin/mod.rs | 4 +- vortex-array/src/array/varbin/stats.rs | 4 +- vortex-array/src/array/varbinview/builder.rs | 2 +- vortex-array/src/array/varbinview/compute.rs | 2 +- vortex-array/src/array/varbinview/mod.rs | 2 +- vortex-array/src/arrow/array.rs | 2 +- vortex-array/src/arrow/dtypes.rs | 6 +-- vortex-array/src/compute/cast.rs | 2 +- vortex-array/src/data.rs | 2 +- vortex-array/src/implementation.rs | 4 +- vortex-array/src/lib.rs | 4 +- vortex-array/src/ptype.rs | 14 ++--- vortex-array/src/scalar/binary.rs | 4 +- vortex-array/src/scalar/bool.rs | 2 +- vortex-array/src/scalar/composite.rs | 2 +- vortex-array/src/scalar/list.rs | 2 +- vortex-array/src/scalar/mod.rs | 2 +- vortex-array/src/scalar/null.rs | 2 +- vortex-array/src/scalar/primitive.rs | 4 +- vortex-array/src/scalar/serde.rs | 2 +- vortex-array/src/scalar/struct_.rs | 2 +- vortex-array/src/scalar/utf8.rs | 2 +- vortex-array/src/scalar/value.rs | 2 +- vortex-array/src/stats.rs | 2 +- vortex-array/src/typed.rs | 2 +- vortex-array/src/validity.rs | 2 +- vortex-array/src/view.rs | 2 +- vortex-datetime-parts/Cargo.toml | 2 +- vortex-dict/Cargo.toml | 2 +- vortex-dict/src/compress.rs | 2 +- vortex-dict/src/compute.rs | 2 +- vortex-dict/src/dict.rs | 2 +- {vortex-schema => vortex-dtype}/Cargo.toml | 4 +- {vortex-schema => vortex-dtype}/build.rs | 0 .../flatbuffers/dtype.fbs | 0 .../src/deserialize.rs | 0 {vortex-schema => vortex-dtype}/src/dtype.rs | 0 {vortex-schema => vortex-dtype}/src/lib.rs | 0 {vortex-schema => vortex-dtype}/src/serde.rs | 0 .../src/serialize.rs | 0 vortex-fastlanes/Cargo.toml | 2 +- vortex-fastlanes/src/bitpacking/mod.rs | 2 +- vortex-fastlanes/src/delta/compress.rs | 2 +- vortex-ipc/Cargo.toml | 2 +- vortex-ipc/benches/ipc_array_reader_take.rs | 2 +- vortex-ipc/flatbuffers/message.fbs | 2 +- vortex-ipc/src/lib.rs | 2 +- vortex-ipc/src/messages.rs | 2 +- vortex-ipc/src/reader.rs | 2 +- vortex-ipc/src/writer.rs | 2 +- vortex-ree/Cargo.toml | 2 +- vortex-ree/src/compress.rs | 2 +- vortex-ree/src/ree.rs | 2 +- vortex-roaring/Cargo.toml | 2 +- vortex-roaring/src/boolean/compress.rs | 4 +- vortex-roaring/src/boolean/mod.rs | 4 +- vortex-roaring/src/integer/compress.rs | 6 +-- vortex-roaring/src/integer/mod.rs | 2 +- vortex-zigzag/Cargo.toml | 2 +- vortex-zigzag/src/zigzag.rs | 2 +- 90 files changed, 137 insertions(+), 137 deletions(-) rename {vortex-schema => vortex-dtype}/Cargo.toml (94%) rename {vortex-schema => vortex-dtype}/build.rs (100%) rename {vortex-schema => vortex-dtype}/flatbuffers/dtype.fbs (100%) rename {vortex-schema => vortex-dtype}/src/deserialize.rs (100%) rename {vortex-schema => vortex-dtype}/src/dtype.rs (100%) rename {vortex-schema => vortex-dtype}/src/lib.rs (100%) rename {vortex-schema => vortex-dtype}/src/serde.rs (100%) rename {vortex-schema => vortex-dtype}/src/serialize.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 5d3f80482c..c0a2ba41b0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -979,12 +979,12 @@ dependencies = [ "vortex-array", "vortex-datetime-parts", "vortex-dict", + "vortex-dtype", "vortex-error", "vortex-fastlanes", "vortex-ipc", "vortex-ree", "vortex-roaring", - "vortex-schema", "vortex-zigzag", ] @@ -3960,11 +3960,11 @@ dependencies = [ "vortex-alp", "vortex-array", "vortex-dict", + "vortex-dtype", "vortex-error", "vortex-fastlanes", "vortex-ree", "vortex-roaring", - "vortex-schema", "vortex-zigzag", ] @@ -5169,8 +5169,8 @@ dependencies = [ "paste", "serde", "vortex-array", + "vortex-dtype", "vortex-error", - "vortex-schema", ] [[package]] @@ -5198,9 +5198,9 @@ dependencies = [ "serde", "thiserror", "vortex-alloc", + "vortex-dtype", "vortex-error", "vortex-flatbuffers", - "vortex-schema", "walkdir", ] @@ -5212,8 +5212,8 @@ dependencies = [ "log", "serde", "vortex-array", + "vortex-dtype", "vortex-error", - "vortex-schema", ] [[package]] @@ -5232,8 +5232,24 @@ dependencies = [ "serde", "simplelog", "vortex-array", + "vortex-dtype", "vortex-error", - "vortex-schema", +] + +[[package]] +name = "vortex-dtype" +version = "0.1.0" +dependencies = [ + "arrow-schema 51.0.0", + "flatbuffers", + "flatc", + "itertools 0.12.1", + "linkme", + "serde", + "thiserror", + "vortex-error", + "vortex-flatbuffers", + "walkdir", ] [[package]] @@ -5263,8 +5279,8 @@ dependencies = [ "serde", "simplelog", "vortex-array", + "vortex-dtype", "vortex-error", - "vortex-schema", ] [[package]] @@ -5296,10 +5312,10 @@ dependencies = [ "streaming-iterator", "vortex-alp", "vortex-array", + "vortex-dtype", "vortex-error", "vortex-fastlanes", "vortex-flatbuffers", - "vortex-schema", "walkdir", ] @@ -5316,8 +5332,8 @@ dependencies = [ "paste", "serde", "vortex-array", + "vortex-dtype", "vortex-error", - "vortex-schema", ] [[package]] @@ -5332,24 +5348,8 @@ dependencies = [ "paste", "serde", "vortex-array", + "vortex-dtype", "vortex-error", - "vortex-schema", -] - -[[package]] -name = "vortex-schema" -version = "0.1.0" -dependencies = [ - "arrow-schema 51.0.0", - "flatbuffers", - "flatc", - "itertools 0.12.1", - "linkme", - "serde", - "thiserror", - "vortex-error", - "vortex-flatbuffers", - "walkdir", ] [[package]] @@ -5360,9 +5360,9 @@ dependencies = [ "serde", "vortex-alloc", "vortex-array", + "vortex-dtype", "vortex-error", "vortex-fastlanes", - "vortex-schema", "zigzag", ] diff --git a/Cargo.toml b/Cargo.toml index d0f56e2b9c..cfe57d0abf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ members = [ "vortex-ipc", "vortex-ree", "vortex-roaring", - "vortex-schema", + "vortex-dtype", "vortex-zigzag", ] resolver = "2" diff --git a/bench-vortex/Cargo.toml b/bench-vortex/Cargo.toml index 922e1ab3e8..be0ccbc042 100644 --- a/bench-vortex/Cargo.toml +++ b/bench-vortex/Cargo.toml @@ -47,7 +47,7 @@ vortex-error = { path = "../vortex-error", features = ["parquet"] } vortex-fastlanes = { path = "../vortex-fastlanes" } vortex-ipc = { path = "../vortex-ipc" } vortex-ree = { path = "../vortex-ree" } -vortex-schema = { path = "../vortex-schema" } +vortex-dtype = { path = "../vortex-dtype" } vortex-zigzag = { path = "../vortex-zigzag" } [dev-dependencies] diff --git a/bench-vortex/src/data_downloads.rs b/bench-vortex/src/data_downloads.rs index 62de6809dd..38dfb5e2c7 100644 --- a/bench-vortex/src/data_downloads.rs +++ b/bench-vortex/src/data_downloads.rs @@ -13,9 +13,9 @@ use parquet::arrow::arrow_reader::ParquetRecordBatchReaderBuilder; use tokio::runtime::Runtime; use vortex::arrow::FromArrowType; use vortex::{IntoArray, SerdeContext, ToArrayData}; +use vortex_dtype::DType; use vortex_error::{VortexError, VortexResult}; use vortex_ipc::writer::StreamWriter; -use vortex_schema::DType; use crate::idempotent; use crate::reader::BATCH_SIZE; diff --git a/bench-vortex/src/lib.rs b/bench-vortex/src/lib.rs index d1a46b9f14..d8621fb82b 100644 --- a/bench-vortex/src/lib.rs +++ b/bench-vortex/src/lib.rs @@ -20,10 +20,10 @@ use vortex::{IntoArray, OwnedArray, ToArrayData}; use vortex_alp::ALPEncoding; use vortex_datetime_parts::DateTimePartsEncoding; use vortex_dict::DictEncoding; +use vortex_dtype::DType; use vortex_fastlanes::{BitPackedEncoding, FoREncoding}; use vortex_ree::REEEncoding; use vortex_roaring::RoaringBoolEncoding; -use vortex_schema::DType; use crate::data_downloads::FileType; use crate::reader::BATCH_SIZE; diff --git a/bench-vortex/src/parquet_utils.rs b/bench-vortex/src/parquet_utils.rs index 88d19ebbe3..857885f5e6 100644 --- a/bench-vortex/src/parquet_utils.rs +++ b/bench-vortex/src/parquet_utils.rs @@ -4,8 +4,8 @@ use std::path::Path; use parquet::arrow::arrow_reader::ParquetRecordBatchReaderBuilder; use vortex::arrow::FromArrowType; +use vortex_dtype::DType; use vortex_error::VortexResult; -use vortex_schema::DType; use crate::data_downloads::FileType; use crate::CompressionRunStats; diff --git a/bench-vortex/src/reader.rs b/bench-vortex/src/reader.rs index cdb5e665c3..479fe3598c 100644 --- a/bench-vortex/src/reader.rs +++ b/bench-vortex/src/reader.rs @@ -22,11 +22,11 @@ use vortex::array::chunked::ChunkedArray; use vortex::arrow::FromArrowType; use vortex::compute::take::take; use vortex::{IntoArray, OwnedArray, SerdeContext, ToArrayData, ToStatic}; +use vortex_dtype::DType; use vortex_error::VortexResult; use vortex_ipc::iter::FallibleLendingIterator; use vortex_ipc::reader::StreamReader; use vortex_ipc::writer::StreamWriter; -use vortex_schema::DType; use crate::compress_ctx; diff --git a/bench-vortex/src/vortex_utils.rs b/bench-vortex/src/vortex_utils.rs index 8fd5cbcc68..b266ac07af 100644 --- a/bench-vortex/src/vortex_utils.rs +++ b/bench-vortex/src/vortex_utils.rs @@ -5,8 +5,8 @@ use std::path::Path; use vortex::array::chunked::ChunkedArray; use vortex::array::r#struct::StructArray; use vortex::ArrayDType; +use vortex_dtype::DType; use vortex_error::VortexResult; -use vortex_schema::DType; use crate::data_downloads::FileType; use crate::reader::open_vortex; diff --git a/pyvortex/Cargo.toml b/pyvortex/Cargo.toml index 566f9d3464..3f123d1d32 100644 --- a/pyvortex/Cargo.toml +++ b/pyvortex/Cargo.toml @@ -27,7 +27,7 @@ vortex-error = { path = "../vortex-error" } vortex-fastlanes = { path = "../vortex-fastlanes" } vortex-ree = { path = "../vortex-ree" } vortex-roaring = { path = "../vortex-roaring" } -vortex-schema = { path = "../vortex-schema" } +vortex-dtype = { path = "../vortex-dtype" } vortex-zigzag = { path = "../vortex-zigzag" } itertools = { workspace = true } log = { workspace = true } diff --git a/pyvortex/src/dtype.rs b/pyvortex/src/dtype.rs index 45e0c568ae..b52578e64c 100644 --- a/pyvortex/src/dtype.rs +++ b/pyvortex/src/dtype.rs @@ -3,7 +3,7 @@ use arrow::pyarrow::FromPyArrow; use pyo3::types::PyType; use pyo3::{pyclass, pymethods, Py, PyAny, PyResult, Python}; use vortex::arrow::FromArrowType; -use vortex_schema::DType; +use vortex_dtype::DType; #[pyclass(name = "DType", module = "vortex", subclass)] pub struct PyDType { diff --git a/pyvortex/src/encode.rs b/pyvortex/src/encode.rs index 6d1382e053..847e8c5595 100644 --- a/pyvortex/src/encode.rs +++ b/pyvortex/src/encode.rs @@ -8,7 +8,7 @@ use pyo3::prelude::*; use vortex::array::chunked::ChunkedArray; use vortex::arrow::{FromArrowArray, FromArrowType}; use vortex::{ArrayData, IntoArray, ToArrayData}; -use vortex_schema::DType; +use vortex_dtype::DType; use crate::array::PyArray; use crate::error::PyVortexError; diff --git a/pyvortex/src/lib.rs b/pyvortex/src/lib.rs index f053b9deb2..14305e84ba 100644 --- a/pyvortex/src/lib.rs +++ b/pyvortex/src/lib.rs @@ -2,8 +2,8 @@ use dtype::PyDType; use log::debug; use pyo3::prelude::*; use vortex::encoding::VORTEX_ENCODINGS; -use vortex_schema::DType; -use vortex_schema::Signedness::{Signed, Unsigned}; +use vortex_dtype::DType; +use vortex_dtype::Signedness::{Signed, Unsigned}; use crate::array::*; diff --git a/vortex-alp/Cargo.toml b/vortex-alp/Cargo.toml index 5740705e83..4ad0072df4 100644 --- a/vortex-alp/Cargo.toml +++ b/vortex-alp/Cargo.toml @@ -23,7 +23,7 @@ paste = { workspace = true } serde = { workspace = true, features = ["derive"] } vortex-array = { path = "../vortex-array" } vortex-error = { path = "../vortex-error" } -vortex-schema = { path = "../vortex-schema" } +vortex-dtype = { path = "../vortex-dtype" } [dev-dependencies] divan = { workspace = true } diff --git a/vortex-alp/src/array.rs b/vortex-alp/src/array.rs index ea5e2c330b..af823d7476 100644 --- a/vortex-alp/src/array.rs +++ b/vortex-alp/src/array.rs @@ -4,8 +4,8 @@ use vortex::stats::ArrayStatisticsCompute; use vortex::validity::{ArrayValidity, LogicalValidity}; use vortex::visitor::{AcceptArrayVisitor, ArrayVisitor}; use vortex::{impl_encoding, ArrayDType, ArrayFlatten, IntoArrayData, OwnedArray, ToArrayData}; +use vortex_dtype::{IntWidth, Signedness}; use vortex_error::{vortex_bail, VortexResult}; -use vortex_schema::{IntWidth, Signedness}; use crate::alp::Exponents; use crate::compress::{alp_encode, decompress}; diff --git a/vortex-array/Cargo.toml b/vortex-array/Cargo.toml index 8a23aa0c5e..979e671fb3 100644 --- a/vortex-array/Cargo.toml +++ b/vortex-array/Cargo.toml @@ -39,7 +39,7 @@ thiserror = { workspace = true } vortex-alloc = { path = "../vortex-alloc" } vortex-error = { path = "../vortex-error", features = ["flexbuffers"] } vortex-flatbuffers = { path = "../vortex-flatbuffers" } -vortex-schema = { path = "../vortex-schema", features = ["serde"] } +vortex-dtype = { path = "../vortex-dtype", features = ["serde"] } serde = { workspace = true, features = ["derive"] } [build-dependencies] diff --git a/vortex-array/flatbuffers/scalar.fbs b/vortex-array/flatbuffers/scalar.fbs index c756f8c65a..c6372dae81 100644 --- a/vortex-array/flatbuffers/scalar.fbs +++ b/vortex-array/flatbuffers/scalar.fbs @@ -1,4 +1,4 @@ -include "vortex-schema/flatbuffers/dtype.fbs"; +include "vortex-dtype/flatbuffers/dtype.fbs"; namespace vortex.scalar; diff --git a/vortex-array/src/array/bool/compute/fill.rs b/vortex-array/src/array/bool/compute/fill.rs index 7987020dd5..01dbdf70a7 100644 --- a/vortex-array/src/array/bool/compute/fill.rs +++ b/vortex-array/src/array/bool/compute/fill.rs @@ -1,5 +1,5 @@ +use vortex_dtype::Nullability; use vortex_error::VortexResult; -use vortex_schema::Nullability; use crate::array::bool::BoolArray; use crate::compute::fill::FillForwardFn; diff --git a/vortex-array/src/array/chunked/mod.rs b/vortex-array/src/array/chunked/mod.rs index 26d269a609..a9c3e9d43a 100644 --- a/vortex-array/src/array/chunked/mod.rs +++ b/vortex-array/src/array/chunked/mod.rs @@ -1,7 +1,7 @@ use itertools::Itertools; use serde::{Deserialize, Serialize}; +use vortex_dtype::{IntWidth, Nullability, Signedness}; use vortex_error::{vortex_bail, VortexResult}; -use vortex_schema::{IntWidth, Nullability, Signedness}; use crate::array::primitive::PrimitiveArray; use crate::compute::scalar_at::scalar_at; @@ -145,7 +145,7 @@ impl EncodingCompression for ChunkedEncoding {} #[cfg(test)] mod test { - use vortex_schema::{DType, IntWidth, Nullability, Signedness}; + use vortex_dtype::{DType, IntWidth, Nullability, Signedness}; use crate::array::chunked::{ChunkedArray, OwnedChunkedArray}; use crate::ptype::NativePType; diff --git a/vortex-array/src/array/composite/array.rs b/vortex-array/src/array/composite/array.rs index 7013ef41be..b5b526c162 100644 --- a/vortex-array/src/array/composite/array.rs +++ b/vortex-array/src/array/composite/array.rs @@ -1,8 +1,8 @@ use flatbuffers::root; +use vortex_dtype::flatbuffers as fb; +use vortex_dtype::{CompositeID, DTypeSerdeContext}; use vortex_error::{vortex_err, VortexResult}; use vortex_flatbuffers::{FlatBufferToBytes, ReadFlatBuffer}; -use vortex_schema::flatbuffers as fb; -use vortex_schema::{CompositeID, DTypeSerdeContext}; use crate::array::composite::{find_extension, CompositeExtensionRef, TypedCompositeArray}; use crate::compute::ArrayCompute; diff --git a/vortex-array/src/array/composite/mod.rs b/vortex-array/src/array/composite/mod.rs index 5146392881..09f6bb5a5f 100644 --- a/vortex-array/src/array/composite/mod.rs +++ b/vortex-array/src/array/composite/mod.rs @@ -1,7 +1,7 @@ pub use array::*; use linkme::distributed_slice; pub use typed::*; -use vortex_schema::CompositeID; +use vortex_dtype::CompositeID; mod array; mod compute; diff --git a/vortex-array/src/array/composite/typed.rs b/vortex-array/src/array/composite/typed.rs index 985240f616..7b4a158e5e 100644 --- a/vortex-array/src/array/composite/typed.rs +++ b/vortex-array/src/array/composite/typed.rs @@ -1,8 +1,8 @@ use std::fmt::Debug; +use vortex_dtype::CompositeID; +use vortex_dtype::DType; use vortex_error::{VortexError, VortexResult}; -use vortex_schema::CompositeID; -use vortex_schema::DType; use crate::array::composite::array::CompositeArray; use crate::array::composite::UnderlyingMetadata; @@ -75,7 +75,7 @@ macro_rules! impl_composite { ($id:expr, $T:ty) => { use linkme::distributed_slice; use paste::paste; - use vortex_schema::{CompositeID, DType, Nullability}; + use vortex_dtype::{CompositeID, DType, Nullability}; use $crate::array::composite::{ CompositeArray, CompositeExtension, TypedCompositeArray, UnderlyingMetadata, VORTEX_COMPOSITE_EXTENSIONS, diff --git a/vortex-array/src/array/constant/flatten.rs b/vortex-array/src/array/constant/flatten.rs index cc4d8c61d2..b2c40b75c8 100644 --- a/vortex-array/src/array/constant/flatten.rs +++ b/vortex-array/src/array/constant/flatten.rs @@ -1,5 +1,5 @@ +use vortex_dtype::Nullability; use vortex_error::VortexResult; -use vortex_schema::Nullability; use crate::array::bool::BoolArray; use crate::array::constant::ConstantArray; diff --git a/vortex-array/src/array/constant/stats.rs b/vortex-array/src/array/constant/stats.rs index f5f5923523..34a4bbb563 100644 --- a/vortex-array/src/array/constant/stats.rs +++ b/vortex-array/src/array/constant/stats.rs @@ -1,7 +1,7 @@ use std::collections::HashMap; +use vortex_dtype::DType; use vortex_error::VortexResult; -use vortex_schema::DType; use crate::array::constant::ConstantArray; use crate::scalar::Scalar; diff --git a/vortex-array/src/array/primitive/compute/cast.rs b/vortex-array/src/array/primitive/compute/cast.rs index c607b67698..7d8da8532b 100644 --- a/vortex-array/src/array/primitive/compute/cast.rs +++ b/vortex-array/src/array/primitive/compute/cast.rs @@ -1,5 +1,5 @@ +use vortex_dtype::DType; use vortex_error::{vortex_err, VortexResult}; -use vortex_schema::DType; use crate::array::primitive::PrimitiveArray; use crate::compute::cast::CastFn; diff --git a/vortex-array/src/array/sparse/compute/mod.rs b/vortex-array/src/array/sparse/compute/mod.rs index ecb06566b3..590ade8876 100644 --- a/vortex-array/src/array/sparse/compute/mod.rs +++ b/vortex-array/src/array/sparse/compute/mod.rs @@ -137,7 +137,7 @@ fn take_search_sorted( #[cfg(test)] mod test { use itertools::Itertools; - use vortex_schema::{DType, FloatWidth, Nullability}; + use vortex_dtype::{DType, FloatWidth, Nullability}; use crate::array::primitive::PrimitiveArray; use crate::array::sparse::compute::take_map; diff --git a/vortex-array/src/array/sparse/mod.rs b/vortex-array/src/array/sparse/mod.rs index 0a5ba7557c..c00e1f403f 100644 --- a/vortex-array/src/array/sparse/mod.rs +++ b/vortex-array/src/array/sparse/mod.rs @@ -172,10 +172,10 @@ impl ArrayValidity for SparseArray<'_> { #[cfg(test)] mod test { use itertools::Itertools; + use vortex_dtype::Nullability::Nullable; + use vortex_dtype::Signedness::Signed; + use vortex_dtype::{DType, IntWidth}; use vortex_error::VortexError; - use vortex_schema::Nullability::Nullable; - use vortex_schema::Signedness::Signed; - use vortex_schema::{DType, IntWidth}; use crate::accessor::ArrayAccessor; use crate::array::sparse::SparseArray; diff --git a/vortex-array/src/array/struct/mod.rs b/vortex-array/src/array/struct/mod.rs index 71aca3ca20..b07e07b0c6 100644 --- a/vortex-array/src/array/struct/mod.rs +++ b/vortex-array/src/array/struct/mod.rs @@ -1,6 +1,6 @@ use serde::{Deserialize, Serialize}; +use vortex_dtype::FieldNames; use vortex_error::{vortex_bail, VortexResult}; -use vortex_schema::FieldNames; use crate::stats::ArrayStatisticsCompute; use crate::validity::{ArrayValidity, LogicalValidity}; diff --git a/vortex-array/src/array/varbin/builder.rs b/vortex-array/src/array/varbin/builder.rs index 0ab49595fe..1ebcf3decd 100644 --- a/vortex-array/src/array/varbin/builder.rs +++ b/vortex-array/src/array/varbin/builder.rs @@ -1,7 +1,7 @@ use std::mem; use arrow_buffer::NullBufferBuilder; -use vortex_schema::DType; +use vortex_dtype::DType; use crate::array::primitive::PrimitiveArray; use crate::array::varbin::{OwnedVarBinArray, VarBinArray}; @@ -67,8 +67,8 @@ impl VarBinBuilder { #[cfg(test)] mod test { - use vortex_schema::DType; - use vortex_schema::Nullability::Nullable; + use vortex_dtype::DType; + use vortex_dtype::Nullability::Nullable; use crate::array::varbin::builder::VarBinBuilder; use crate::compute::scalar_at::scalar_at; diff --git a/vortex-array/src/array/varbin/compute/mod.rs b/vortex-array/src/array/varbin/compute/mod.rs index 8783587d13..9ec6e53e2f 100644 --- a/vortex-array/src/array/varbin/compute/mod.rs +++ b/vortex-array/src/array/varbin/compute/mod.rs @@ -4,8 +4,8 @@ use arrow_array::{ ArrayRef as ArrowArrayRef, BinaryArray, LargeBinaryArray, LargeStringArray, StringArray, }; use itertools::Itertools; +use vortex_dtype::DType; use vortex_error::{vortex_bail, VortexResult}; -use vortex_schema::DType; use crate::array::primitive::PrimitiveArray; use crate::array::varbin::{varbin_scalar, VarBinArray}; diff --git a/vortex-array/src/array/varbin/compute/take.rs b/vortex-array/src/array/varbin/compute/take.rs index 5fc52d2123..e352a2d223 100644 --- a/vortex-array/src/array/varbin/compute/take.rs +++ b/vortex-array/src/array/varbin/compute/take.rs @@ -1,6 +1,6 @@ use arrow_buffer::NullBuffer; +use vortex_dtype::DType; use vortex_error::VortexResult; -use vortex_schema::DType; use crate::array::varbin::builder::VarBinBuilder; use crate::array::varbin::{OwnedVarBinArray, VarBinArray}; diff --git a/vortex-array/src/array/varbin/mod.rs b/vortex-array/src/array/varbin/mod.rs index d516a44e42..c110e7dc33 100644 --- a/vortex-array/src/array/varbin/mod.rs +++ b/vortex-array/src/array/varbin/mod.rs @@ -1,7 +1,7 @@ use num_traits::AsPrimitive; use serde::{Deserialize, Serialize}; +use vortex_dtype::{IntWidth, Nullability, Signedness}; use vortex_error::{vortex_bail, VortexResult}; -use vortex_schema::{IntWidth, Nullability, Signedness}; use crate::array::varbin::builder::VarBinBuilder; use crate::compute::scalar_at::scalar_at; @@ -221,7 +221,7 @@ impl EncodingCompression for VarBinEncoding {} #[cfg(test)] mod test { - use vortex_schema::{DType, Nullability}; + use vortex_dtype::{DType, Nullability}; use crate::array::primitive::PrimitiveArray; use crate::array::varbin::VarBinArray; diff --git a/vortex-array/src/array/varbin/stats.rs b/vortex-array/src/array/varbin/stats.rs index db8159af48..15c2718117 100644 --- a/vortex-array/src/array/varbin/stats.rs +++ b/vortex-array/src/array/varbin/stats.rs @@ -1,8 +1,8 @@ use std::cmp::Ordering; use std::collections::HashMap; +use vortex_dtype::DType; use vortex_error::VortexResult; -use vortex_schema::DType; use crate::accessor::ArrayAccessor; use crate::array::varbin::{varbin_scalar, VarBinArray}; @@ -127,7 +127,7 @@ impl<'a> VarBinAccumulator<'a> { #[cfg(test)] mod test { - use vortex_schema::{DType, Nullability}; + use vortex_dtype::{DType, Nullability}; use crate::array::varbin::{OwnedVarBinArray, VarBinArray}; use crate::stats::{ArrayStatistics, Stat}; diff --git a/vortex-array/src/array/varbinview/builder.rs b/vortex-array/src/array/varbinview/builder.rs index 2570a47eeb..5717a8d6ef 100644 --- a/vortex-array/src/array/varbinview/builder.rs +++ b/vortex-array/src/array/varbinview/builder.rs @@ -3,7 +3,7 @@ use std::mem; use std::mem::ManuallyDrop; use arrow_buffer::NullBufferBuilder; -use vortex_schema::DType; +use vortex_dtype::DType; use crate::array::primitive::PrimitiveArray; use crate::array::varbinview::{ diff --git a/vortex-array/src/array/varbinview/compute.rs b/vortex-array/src/array/varbinview/compute.rs index 3ad2068aa6..84ed0aa027 100644 --- a/vortex-array/src/array/varbinview/compute.rs +++ b/vortex-array/src/array/varbinview/compute.rs @@ -4,8 +4,8 @@ use arrow_array::{ArrayRef as ArrowArrayRef, BinaryViewArray, StringViewArray}; use arrow_buffer::Buffer as ArrowBuffer; use arrow_buffer::ScalarBuffer; use itertools::Itertools; +use vortex_dtype::DType; use vortex_error::{vortex_bail, VortexResult}; -use vortex_schema::DType; use crate::array::varbin::varbin_scalar; use crate::array::varbinview::{VarBinViewArray, VIEW_SIZE}; diff --git a/vortex-array/src/array/varbinview/mod.rs b/vortex-array/src/array/varbinview/mod.rs index 6ee34c976d..468937f6af 100644 --- a/vortex-array/src/array/varbinview/mod.rs +++ b/vortex-array/src/array/varbinview/mod.rs @@ -2,8 +2,8 @@ use std::fmt::Formatter; use std::{mem, slice}; use ::serde::{Deserialize, Serialize}; +use vortex_dtype::{IntWidth, Nullability, Signedness}; use vortex_error::{vortex_bail, VortexResult}; -use vortex_schema::{IntWidth, Nullability, Signedness}; use crate::array::primitive::PrimitiveArray; use crate::array::varbinview::builder::VarBinViewBuilder; diff --git a/vortex-array/src/arrow/array.rs b/vortex-array/src/arrow/array.rs index 28fa0d0b1d..1761398069 100644 --- a/vortex-array/src/arrow/array.rs +++ b/vortex-array/src/arrow/array.rs @@ -21,7 +21,7 @@ use arrow_array::{BinaryViewArray, GenericByteViewArray, StringViewArray}; use arrow_buffer::buffer::{NullBuffer, OffsetBuffer}; use arrow_buffer::{ArrowNativeType, Buffer, ScalarBuffer}; use arrow_schema::{DataType, TimeUnit}; -use vortex_schema::DType; +use vortex_dtype::DType; use crate::array::bool::BoolArray; use crate::array::constant::ConstantArray; diff --git a/vortex-array/src/arrow/dtypes.rs b/vortex-array/src/arrow/dtypes.rs index efad3c598e..2a63178c2d 100644 --- a/vortex-array/src/arrow/dtypes.rs +++ b/vortex-array/src/arrow/dtypes.rs @@ -3,8 +3,8 @@ use std::sync::Arc; use arrow_schema::TimeUnit as ArrowTimeUnit; use arrow_schema::{DataType, Field, SchemaRef}; use itertools::Itertools; +use vortex_dtype::{DType, FloatWidth, IntWidth, Nullability}; use vortex_error::{vortex_err, VortexError, VortexResult}; -use vortex_schema::{DType, FloatWidth, IntWidth, Nullability}; use crate::array::datetime::{LocalDateTimeExtension, TimeUnit}; use crate::arrow::FromArrowType; @@ -59,8 +59,8 @@ impl FromArrowType for DType { impl FromArrowType<&Field> for DType { fn from_arrow(field: &Field) -> Self { - use vortex_schema::DType::*; - use vortex_schema::Signedness::*; + use vortex_dtype::DType::*; + use vortex_dtype::Signedness::*; let nullability: Nullability = field.is_nullable().into(); diff --git a/vortex-array/src/compute/cast.rs b/vortex-array/src/compute/cast.rs index 6a7d538260..d2b1323c97 100644 --- a/vortex-array/src/compute/cast.rs +++ b/vortex-array/src/compute/cast.rs @@ -1,5 +1,5 @@ +use vortex_dtype::DType; use vortex_error::{vortex_err, VortexResult}; -use vortex_schema::DType; use crate::{Array, ArrayDType, OwnedArray, ToStatic}; diff --git a/vortex-array/src/data.rs b/vortex-array/src/data.rs index 5e6e791500..d6c6920ab6 100644 --- a/vortex-array/src/data.rs +++ b/vortex-array/src/data.rs @@ -1,8 +1,8 @@ use std::collections::HashMap; use std::sync::{Arc, RwLock}; +use vortex_dtype::DType; use vortex_error::VortexResult; -use vortex_schema::DType; use crate::buffer::{Buffer, OwnedBuffer}; use crate::encoding::EncodingRef; diff --git a/vortex-array/src/implementation.rs b/vortex-array/src/implementation.rs index c07ff65649..0064435a26 100644 --- a/vortex-array/src/implementation.rs +++ b/vortex-array/src/implementation.rs @@ -1,5 +1,5 @@ +use vortex_dtype::DType; use vortex_error::{vortex_bail, VortexError, VortexResult}; -use vortex_schema::DType; use crate::buffer::{Buffer, OwnedBuffer}; use crate::encoding::{ArrayEncoding, ArrayEncodingRef, EncodingRef}; @@ -58,7 +58,7 @@ macro_rules! impl_encoding { use std::marker::{Send, Sync}; use std::sync::Arc; use vortex_error::VortexError; - use vortex_schema::DType; + use vortex_dtype::DType; /// The array definition trait #[derive(Debug, Clone)] diff --git a/vortex-array/src/lib.rs b/vortex-array/src/lib.rs index 26d5ea0bf2..f821516172 100644 --- a/vortex-array/src/lib.rs +++ b/vortex-array/src/lib.rs @@ -32,8 +32,8 @@ pub use linkme; pub use metadata::*; pub use typed::*; pub use view::*; +use vortex_dtype::DType; use vortex_error::VortexResult; -use vortex_schema::DType; use crate::buffer::Buffer; use crate::compute::ArrayCompute; @@ -65,7 +65,7 @@ pub mod flatbuffers { mod deps { pub mod dtype { #[allow(unused_imports)] - pub use vortex_schema::flatbuffers as dtype; + pub use vortex_dtype::flatbuffers as dtype; } } } diff --git a/vortex-array/src/ptype.rs b/vortex-array/src/ptype.rs index bd34934ba0..71c02de223 100644 --- a/vortex-array/src/ptype.rs +++ b/vortex-array/src/ptype.rs @@ -6,9 +6,9 @@ use arrow_buffer::ArrowNativeType; use half::f16; use num_traits::{Num, NumCast}; use serde::{Deserialize, Serialize}; +use vortex_dtype::DType::*; +use vortex_dtype::{DType, FloatWidth, IntWidth}; use vortex_error::{vortex_err, VortexError, VortexResult}; -use vortex_schema::DType::*; -use vortex_schema::{DType, FloatWidth, IntWidth}; use crate::scalar::{PScalar, Scalar}; @@ -207,7 +207,7 @@ impl TryFrom<&DType> for PType { type Error = VortexError; fn try_from(value: &DType) -> VortexResult { - use vortex_schema::Signedness::*; + use vortex_dtype::Signedness::*; match value { Int(w, s, _) => match (w, s) { (IntWidth::_8, Signed) => Ok(PType::I8), @@ -231,8 +231,8 @@ impl TryFrom<&DType> for PType { impl From for &DType { fn from(item: PType) -> Self { - use vortex_schema::Nullability::*; - use vortex_schema::Signedness::*; + use vortex_dtype::Nullability::*; + use vortex_dtype::Signedness::*; match item { PType::I8 => &Int(IntWidth::_8, Signed, NonNullable), @@ -252,8 +252,8 @@ impl From for &DType { impl From for DType { fn from(item: PType) -> Self { - use vortex_schema::Nullability::*; - use vortex_schema::Signedness::*; + use vortex_dtype::Nullability::*; + use vortex_dtype::Signedness::*; match item { PType::I8 => Int(IntWidth::_8, Signed, NonNullable), diff --git a/vortex-array/src/scalar/binary.rs b/vortex-array/src/scalar/binary.rs index 04bd559699..136d73101b 100644 --- a/vortex-array/src/scalar/binary.rs +++ b/vortex-array/src/scalar/binary.rs @@ -1,8 +1,8 @@ use std::fmt::{Display, Formatter}; +use vortex_dtype::DType; +use vortex_dtype::Nullability::{NonNullable, Nullable}; use vortex_error::{vortex_bail, vortex_err, VortexError, VortexResult}; -use vortex_schema::DType; -use vortex_schema::Nullability::{NonNullable, Nullable}; use crate::scalar::value::ScalarValue; use crate::scalar::Scalar; diff --git a/vortex-array/src/scalar/bool.rs b/vortex-array/src/scalar/bool.rs index c77f8fd52e..806640357c 100644 --- a/vortex-array/src/scalar/bool.rs +++ b/vortex-array/src/scalar/bool.rs @@ -1,7 +1,7 @@ use std::fmt::{Display, Formatter}; +use vortex_dtype::{DType, Nullability}; use vortex_error::{vortex_bail, vortex_err, VortexError, VortexResult}; -use vortex_schema::{DType, Nullability}; use crate::scalar::value::ScalarValue; use crate::scalar::Scalar; diff --git a/vortex-array/src/scalar/composite.rs b/vortex-array/src/scalar/composite.rs index eaa3dedc3c..4b0cbceceb 100644 --- a/vortex-array/src/scalar/composite.rs +++ b/vortex-array/src/scalar/composite.rs @@ -1,7 +1,7 @@ use std::fmt::{Display, Formatter}; +use vortex_dtype::DType; use vortex_error::VortexResult; -use vortex_schema::DType; use crate::scalar::Scalar; diff --git a/vortex-array/src/scalar/list.rs b/vortex-array/src/scalar/list.rs index 24d12864e9..a0f8e47ca8 100644 --- a/vortex-array/src/scalar/list.rs +++ b/vortex-array/src/scalar/list.rs @@ -1,8 +1,8 @@ use std::fmt::{Display, Formatter}; use itertools::Itertools; +use vortex_dtype::DType; use vortex_error::{vortex_err, VortexError, VortexResult}; -use vortex_schema::DType; use crate::scalar::Scalar; diff --git a/vortex-array/src/scalar/mod.rs b/vortex-array/src/scalar/mod.rs index 4c2c255961..7c0fbd79a5 100644 --- a/vortex-array/src/scalar/mod.rs +++ b/vortex-array/src/scalar/mod.rs @@ -9,8 +9,8 @@ pub use null::*; pub use primitive::*; pub use struct_::*; pub use utf8::*; +use vortex_dtype::{DType, FloatWidth, IntWidth, Nullability, Signedness}; use vortex_error::VortexResult; -use vortex_schema::{DType, FloatWidth, IntWidth, Nullability, Signedness}; use crate::ptype::NativePType; diff --git a/vortex-array/src/scalar/null.rs b/vortex-array/src/scalar/null.rs index 1327215a51..2b157f143f 100644 --- a/vortex-array/src/scalar/null.rs +++ b/vortex-array/src/scalar/null.rs @@ -1,7 +1,7 @@ use std::fmt::{Display, Formatter}; +use vortex_dtype::DType; use vortex_error::VortexResult; -use vortex_schema::DType; use crate::scalar::Scalar; diff --git a/vortex-array/src/scalar/primitive.rs b/vortex-array/src/scalar/primitive.rs index e0cfaddd3d..07234edceb 100644 --- a/vortex-array/src/scalar/primitive.rs +++ b/vortex-array/src/scalar/primitive.rs @@ -3,8 +3,8 @@ use std::fmt::{Display, Formatter}; use std::mem::size_of; use half::f16; +use vortex_dtype::{DType, Nullability}; use vortex_error::{vortex_bail, vortex_err, VortexError, VortexResult}; -use vortex_schema::{DType, Nullability}; use crate::ptype::{NativePType, PType}; use crate::scalar::Scalar; @@ -337,8 +337,8 @@ impl Display for PScalar { #[cfg(test)] mod test { + use vortex_dtype::{DType, IntWidth, Nullability, Signedness}; use vortex_error::VortexError; - use vortex_schema::{DType, IntWidth, Nullability, Signedness}; use crate::ptype::PType; use crate::scalar::Scalar; diff --git a/vortex-array/src/scalar/serde.rs b/vortex-array/src/scalar/serde.rs index a749f20094..d7f5474bd4 100644 --- a/vortex-array/src/scalar/serde.rs +++ b/vortex-array/src/scalar/serde.rs @@ -1,9 +1,9 @@ use flatbuffers::{root, FlatBufferBuilder, WIPOffset}; use serde::de::Visitor; use serde::{Deserialize, Deserializer, Serialize, Serializer}; +use vortex_dtype::{DTypeSerdeContext, Nullability}; use vortex_error::{vortex_bail, VortexError}; use vortex_flatbuffers::{FlatBufferRoot, FlatBufferToBytes, ReadFlatBuffer, WriteFlatBuffer}; -use vortex_schema::{DTypeSerdeContext, Nullability}; use crate::flatbuffers::scalar as fb; use crate::match_each_native_ptype; diff --git a/vortex-array/src/scalar/struct_.rs b/vortex-array/src/scalar/struct_.rs index 3955903bde..f234d7a14b 100644 --- a/vortex-array/src/scalar/struct_.rs +++ b/vortex-array/src/scalar/struct_.rs @@ -3,8 +3,8 @@ use std::fmt::{Display, Formatter}; use std::sync::Arc; use itertools::Itertools; +use vortex_dtype::DType; use vortex_error::{vortex_bail, vortex_err, VortexResult}; -use vortex_schema::DType; use crate::scalar::Scalar; diff --git a/vortex-array/src/scalar/utf8.rs b/vortex-array/src/scalar/utf8.rs index 0aca282b0a..9d742205e4 100644 --- a/vortex-array/src/scalar/utf8.rs +++ b/vortex-array/src/scalar/utf8.rs @@ -1,7 +1,7 @@ use std::fmt::{Display, Formatter}; +use vortex_dtype::{DType, Nullability::NonNullable, Nullability::Nullable}; use vortex_error::{vortex_bail, vortex_err, VortexError, VortexResult}; -use vortex_schema::{DType, Nullability::NonNullable, Nullability::Nullable}; use crate::scalar::value::ScalarValue; use crate::scalar::Scalar; diff --git a/vortex-array/src/scalar/value.rs b/vortex-array/src/scalar/value.rs index 56aada0962..3618fbd19c 100644 --- a/vortex-array/src/scalar/value.rs +++ b/vortex-array/src/scalar/value.rs @@ -1,5 +1,5 @@ +use vortex_dtype::Nullability; use vortex_error::{vortex_bail, VortexResult}; -use vortex_schema::Nullability; #[derive(Debug, Clone, PartialEq, PartialOrd)] pub struct ScalarValue { diff --git a/vortex-array/src/stats.rs b/vortex-array/src/stats.rs index 89b0177159..5d9ae9ed76 100644 --- a/vortex-array/src/stats.rs +++ b/vortex-array/src/stats.rs @@ -1,7 +1,7 @@ use std::collections::HashMap; +use vortex_dtype::DType; use vortex_error::VortexResult; -use vortex_schema::DType; use crate::ptype::NativePType; use crate::scalar::Scalar; diff --git a/vortex-array/src/typed.rs b/vortex-array/src/typed.rs index 26ff5b2fa1..e116e18120 100644 --- a/vortex-array/src/typed.rs +++ b/vortex-array/src/typed.rs @@ -1,8 +1,8 @@ use std::collections::HashMap; use std::sync::Arc; +use vortex_dtype::DType; use vortex_error::{vortex_err, VortexError, VortexResult}; -use vortex_schema::DType; use crate::buffer::OwnedBuffer; use crate::scalar::Scalar; diff --git a/vortex-array/src/validity.rs b/vortex-array/src/validity.rs index b0746ef2e0..be3fb28272 100644 --- a/vortex-array/src/validity.rs +++ b/vortex-array/src/validity.rs @@ -1,7 +1,7 @@ use arrow_buffer::{BooleanBuffer, NullBuffer}; use serde::{Deserialize, Serialize}; +use vortex_dtype::{DType, Nullability}; use vortex_error::{vortex_bail, VortexResult}; -use vortex_schema::{DType, Nullability}; use crate::array::bool::BoolArray; use crate::compute::as_contiguous::as_contiguous; diff --git a/vortex-array/src/view.rs b/vortex-array/src/view.rs index eeec5cd974..925fe97390 100644 --- a/vortex-array/src/view.rs +++ b/vortex-array/src/view.rs @@ -1,7 +1,7 @@ use std::fmt::{Debug, Formatter}; +use vortex_dtype::DType; use vortex_error::{vortex_bail, vortex_err, VortexError, VortexResult}; -use vortex_schema::DType; use crate::buffer::Buffer; use crate::encoding::EncodingRef; diff --git a/vortex-datetime-parts/Cargo.toml b/vortex-datetime-parts/Cargo.toml index 699a4f77e0..f5dd3239c6 100644 --- a/vortex-datetime-parts/Cargo.toml +++ b/vortex-datetime-parts/Cargo.toml @@ -9,7 +9,7 @@ workspace = true [dependencies] vortex-array = { "path" = "../vortex-array" } vortex-error = { path = "../vortex-error" } -vortex-schema = { "path" = "../vortex-schema" } +vortex-dtype = { "path" = "../vortex-dtype" } linkme = { workspace = true } log = { workspace = true } serde = { workspace = true, features = ["derive"] } diff --git a/vortex-dict/Cargo.toml b/vortex-dict/Cargo.toml index be3faf814f..d7554d53c0 100644 --- a/vortex-dict/Cargo.toml +++ b/vortex-dict/Cargo.toml @@ -22,7 +22,7 @@ paste = { workspace = true } serde = { workspace = true } vortex-array = { path = "../vortex-array" } vortex-error = { path = "../vortex-error" } -vortex-schema = { path = "../vortex-schema" } +vortex-dtype = { path = "../vortex-dtype" } [lints] workspace = true diff --git a/vortex-dict/src/compress.rs b/vortex-dict/src/compress.rs index dd124bcc04..4fcbbc4f9d 100644 --- a/vortex-dict/src/compress.rs +++ b/vortex-dict/src/compress.rs @@ -15,8 +15,8 @@ use vortex::validity::Validity; use vortex::{ match_each_native_ptype, Array, ArrayDType, ArrayDef, IntoArray, OwnedArray, ToArray, }; +use vortex_dtype::DType; use vortex_error::VortexResult; -use vortex_schema::DType; use crate::dict::{DictArray, DictEncoding}; diff --git a/vortex-dict/src/compute.rs b/vortex-dict/src/compute.rs index 24f8ef8e8a..c4dc88b290 100644 --- a/vortex-dict/src/compute.rs +++ b/vortex-dict/src/compute.rs @@ -52,7 +52,7 @@ mod test { use vortex::array::primitive::PrimitiveArray; use vortex::array::varbin::VarBinArray; use vortex::{IntoArray, ToArray}; - use vortex_schema::{DType, Nullability}; + use vortex_dtype::{DType, Nullability}; use crate::{dict_encode_typed_primitive, dict_encode_varbin, DictArray}; diff --git a/vortex-dict/src/dict.rs b/vortex-dict/src/dict.rs index 127113dddc..8844a3c0b3 100644 --- a/vortex-dict/src/dict.rs +++ b/vortex-dict/src/dict.rs @@ -7,8 +7,8 @@ use vortex::validity::{ArrayValidity, LogicalValidity}; use vortex::visitor::{AcceptArrayVisitor, ArrayVisitor}; use vortex::IntoArrayData; use vortex::{impl_encoding, match_each_integer_ptype, ArrayDType, ArrayFlatten, ToArrayData}; +use vortex_dtype::Signedness; use vortex_error::{vortex_bail, VortexResult}; -use vortex_schema::Signedness; impl_encoding!("vortex.dict", Dict); diff --git a/vortex-schema/Cargo.toml b/vortex-dtype/Cargo.toml similarity index 94% rename from vortex-schema/Cargo.toml rename to vortex-dtype/Cargo.toml index 22847bfa08..fc01da2a11 100644 --- a/vortex-schema/Cargo.toml +++ b/vortex-dtype/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "vortex-schema" +name = "vortex-dtype" version = { workspace = true } description = "Vortex schema" homepage = { workspace = true } @@ -12,7 +12,7 @@ edition = { workspace = true } rust-version = { workspace = true } [lib] -name = "vortex_schema" +name = "vortex_dtype" path = "src/lib.rs" [dependencies] diff --git a/vortex-schema/build.rs b/vortex-dtype/build.rs similarity index 100% rename from vortex-schema/build.rs rename to vortex-dtype/build.rs diff --git a/vortex-schema/flatbuffers/dtype.fbs b/vortex-dtype/flatbuffers/dtype.fbs similarity index 100% rename from vortex-schema/flatbuffers/dtype.fbs rename to vortex-dtype/flatbuffers/dtype.fbs diff --git a/vortex-schema/src/deserialize.rs b/vortex-dtype/src/deserialize.rs similarity index 100% rename from vortex-schema/src/deserialize.rs rename to vortex-dtype/src/deserialize.rs diff --git a/vortex-schema/src/dtype.rs b/vortex-dtype/src/dtype.rs similarity index 100% rename from vortex-schema/src/dtype.rs rename to vortex-dtype/src/dtype.rs diff --git a/vortex-schema/src/lib.rs b/vortex-dtype/src/lib.rs similarity index 100% rename from vortex-schema/src/lib.rs rename to vortex-dtype/src/lib.rs diff --git a/vortex-schema/src/serde.rs b/vortex-dtype/src/serde.rs similarity index 100% rename from vortex-schema/src/serde.rs rename to vortex-dtype/src/serde.rs diff --git a/vortex-schema/src/serialize.rs b/vortex-dtype/src/serialize.rs similarity index 100% rename from vortex-schema/src/serialize.rs rename to vortex-dtype/src/serialize.rs diff --git a/vortex-fastlanes/Cargo.toml b/vortex-fastlanes/Cargo.toml index edac5af797..da4620b906 100644 --- a/vortex-fastlanes/Cargo.toml +++ b/vortex-fastlanes/Cargo.toml @@ -25,7 +25,7 @@ paste = { workspace = true } serde = { workspace = true } vortex-array = { path = "../vortex-array" } vortex-error = { path = "../vortex-error" } -vortex-schema = { path = "../vortex-schema" } +vortex-dtype = { path = "../vortex-dtype" } [dev-dependencies] criterion = { workspace = true } diff --git a/vortex-fastlanes/src/bitpacking/mod.rs b/vortex-fastlanes/src/bitpacking/mod.rs index 798bc13251..6927b69b86 100644 --- a/vortex-fastlanes/src/bitpacking/mod.rs +++ b/vortex-fastlanes/src/bitpacking/mod.rs @@ -5,8 +5,8 @@ use vortex::stats::ArrayStatisticsCompute; use vortex::validity::{ArrayValidity, LogicalValidity, Validity, ValidityMetadata}; use vortex::visitor::{AcceptArrayVisitor, ArrayVisitor}; use vortex::{impl_encoding, ArrayDType, ArrayFlatten, IntoArrayData}; +use vortex_dtype::{IntWidth, Nullability, Signedness}; use vortex_error::{vortex_bail, vortex_err, VortexResult}; -use vortex_schema::{IntWidth, Nullability, Signedness}; mod compress; mod compute; diff --git a/vortex-fastlanes/src/delta/compress.rs b/vortex-fastlanes/src/delta/compress.rs index 64c3c9b02b..a205a5af3e 100644 --- a/vortex-fastlanes/src/delta/compress.rs +++ b/vortex-fastlanes/src/delta/compress.rs @@ -9,8 +9,8 @@ use vortex::compute::fill::fill_forward; use vortex::ptype::NativePType; use vortex::validity::Validity; use vortex::{match_each_integer_ptype, Array, IntoArray, OwnedArray}; +use vortex_dtype::Nullability; use vortex_error::VortexResult; -use vortex_schema::Nullability; use crate::{DeltaArray, DeltaEncoding}; diff --git a/vortex-ipc/Cargo.toml b/vortex-ipc/Cargo.toml index 8d48cfdeb0..6f47e369eb 100644 --- a/vortex-ipc/Cargo.toml +++ b/vortex-ipc/Cargo.toml @@ -21,7 +21,7 @@ streaming-iterator = "0.1.9" vortex-array = { path = "../vortex-array" } vortex-error = { path = "../vortex-error" } vortex-flatbuffers = { path = "../vortex-flatbuffers" } -vortex-schema = { path = "../vortex-schema" } +vortex-dtype = { path = "../vortex-dtype" } [build-dependencies] flatc = { workspace = true } diff --git a/vortex-ipc/benches/ipc_array_reader_take.rs b/vortex-ipc/benches/ipc_array_reader_take.rs index cdd8918e1a..2a815d2600 100644 --- a/vortex-ipc/benches/ipc_array_reader_take.rs +++ b/vortex-ipc/benches/ipc_array_reader_take.rs @@ -4,10 +4,10 @@ use criterion::{black_box, criterion_group, criterion_main, Criterion}; use itertools::Itertools; use vortex::array::primitive::PrimitiveArray; use vortex::{IntoArray, SerdeContext}; +use vortex_dtype::{DType, Nullability, Signedness}; use vortex_ipc::iter::FallibleLendingIterator; use vortex_ipc::reader::StreamReader; use vortex_ipc::writer::StreamWriter; -use vortex_schema::{DType, Nullability, Signedness}; // 100 record batches, 100k rows each // take from the first 20 batches and last batch diff --git a/vortex-ipc/flatbuffers/message.fbs b/vortex-ipc/flatbuffers/message.fbs index 1a0fb691ab..9b95e1c3d6 100644 --- a/vortex-ipc/flatbuffers/message.fbs +++ b/vortex-ipc/flatbuffers/message.fbs @@ -1,5 +1,5 @@ include "vortex-array/flatbuffers/array.fbs"; -include "vortex-schema/flatbuffers/dtype.fbs"; +include "vortex-dtype/flatbuffers/dtype.fbs"; namespace vortex.ipc; diff --git a/vortex-ipc/src/lib.rs b/vortex-ipc/src/lib.rs index f5a502b18a..19198f33be 100644 --- a/vortex-ipc/src/lib.rs +++ b/vortex-ipc/src/lib.rs @@ -20,7 +20,7 @@ pub mod flatbuffers { pub use vortex::flatbuffers::array; } pub mod dtype { - pub use vortex_schema::flatbuffers as dtype; + pub use vortex_dtype::flatbuffers as dtype; } } } diff --git a/vortex-ipc/src/messages.rs b/vortex-ipc/src/messages.rs index f3d8ae9620..b3beb426eb 100644 --- a/vortex-ipc/src/messages.rs +++ b/vortex-ipc/src/messages.rs @@ -3,9 +3,9 @@ use itertools::Itertools; use vortex::encoding::find_encoding; use vortex::flatbuffers::array as fba; use vortex::{ArrayData, SerdeContext}; +use vortex_dtype::DType; use vortex_error::{vortex_err, VortexError}; use vortex_flatbuffers::{FlatBufferRoot, WriteFlatBuffer}; -use vortex_schema::DType; use crate::flatbuffers::ipc as fb; use crate::flatbuffers::ipc::Compression; diff --git a/vortex-ipc/src/reader.rs b/vortex-ipc/src/reader.rs index 7cd13553eb..a9d0fdb077 100644 --- a/vortex-ipc/src/reader.rs +++ b/vortex-ipc/src/reader.rs @@ -18,9 +18,9 @@ use vortex::{ match_each_integer_ptype, Array, ArrayDType, ArrayView, IntoArray, OwnedArray, SerdeContext, ToArray, ToStatic, }; +use vortex_dtype::{DType, DTypeSerdeContext, Signedness}; use vortex_error::{vortex_bail, vortex_err, VortexError, VortexResult}; use vortex_flatbuffers::ReadFlatBuffer; -use vortex_schema::{DType, DTypeSerdeContext, Signedness}; use crate::flatbuffers::ipc::Message; use crate::iter::{FallibleLendingIterator, FallibleLendingIteratorāļžItem}; diff --git a/vortex-ipc/src/writer.rs b/vortex-ipc/src/writer.rs index a12aec61c6..f8e6516a30 100644 --- a/vortex-ipc/src/writer.rs +++ b/vortex-ipc/src/writer.rs @@ -3,9 +3,9 @@ use std::io::{BufWriter, Write}; use itertools::Itertools; use vortex::array::chunked::ChunkedArray; use vortex::{Array, ArrayDType, SerdeContext, ToArrayData}; +use vortex_dtype::DType; use vortex_error::VortexResult; use vortex_flatbuffers::FlatBufferWriter; -use vortex_schema::DType; use crate::messages::{IPCChunk, IPCContext, IPCMessage, IPCSchema}; use crate::ALIGNMENT; diff --git a/vortex-ree/Cargo.toml b/vortex-ree/Cargo.toml index d296932351..d83fcab7f3 100644 --- a/vortex-ree/Cargo.toml +++ b/vortex-ree/Cargo.toml @@ -22,7 +22,7 @@ paste = { workspace = true } serde = { workspace = true } vortex-array = { path = "../vortex-array" } vortex-error = { path = "../vortex-error" } -vortex-schema = { path = "../vortex-schema" } +vortex-dtype = { path = "../vortex-dtype" } [lints] workspace = true diff --git a/vortex-ree/src/compress.rs b/vortex-ree/src/compress.rs index 624ad1475d..7615377c25 100644 --- a/vortex-ree/src/compress.rs +++ b/vortex-ree/src/compress.rs @@ -10,8 +10,8 @@ use vortex::validity::Validity; use vortex::ArrayDType; use vortex::ArrayTrait; use vortex::{match_each_integer_ptype, Array, ArrayDef, IntoArray, OwnedArray}; +use vortex_dtype::Nullability; use vortex_error::VortexResult; -use vortex_schema::Nullability; use crate::{REEArray, REEEncoding}; diff --git a/vortex-ree/src/ree.rs b/vortex-ree/src/ree.rs index 971b264da8..2186b335b9 100644 --- a/vortex-ree/src/ree.rs +++ b/vortex-ree/src/ree.rs @@ -145,7 +145,7 @@ mod test { use vortex::compute::slice::slice; use vortex::validity::Validity; use vortex::{ArrayDType, ArrayTrait, IntoArray}; - use vortex_schema::{DType, IntWidth, Nullability, Signedness}; + use vortex_dtype::{DType, IntWidth, Nullability, Signedness}; use crate::REEArray; diff --git a/vortex-roaring/Cargo.toml b/vortex-roaring/Cargo.toml index 8921cef7e6..7bd42aac7d 100644 --- a/vortex-roaring/Cargo.toml +++ b/vortex-roaring/Cargo.toml @@ -15,7 +15,7 @@ rust-version = { workspace = true } arrow-buffer = { workspace = true } vortex-array = { path = "../vortex-array" } vortex-error = { path = "../vortex-error" } -vortex-schema = { path = "../vortex-schema" } +vortex-dtype = { path = "../vortex-dtype" } linkme = { workspace = true } croaring = { workspace = true } num-traits = { workspace = true } diff --git a/vortex-roaring/src/boolean/compress.rs b/vortex-roaring/src/boolean/compress.rs index ea5e3ebe15..78f3be3027 100644 --- a/vortex-roaring/src/boolean/compress.rs +++ b/vortex-roaring/src/boolean/compress.rs @@ -2,9 +2,9 @@ use croaring::Bitmap; use vortex::array::bool::BoolArray; use vortex::compress::{CompressConfig, CompressCtx, EncodingCompression}; use vortex::{Array, ArrayDType, ArrayDef, ArrayTrait, IntoArray, OwnedArray}; +use vortex_dtype::DType; +use vortex_dtype::Nullability::NonNullable; use vortex_error::VortexResult; -use vortex_schema::DType; -use vortex_schema::Nullability::NonNullable; use crate::boolean::RoaringBoolArray; use crate::{OwnedRoaringBoolArray, RoaringBool, RoaringBoolEncoding}; diff --git a/vortex-roaring/src/boolean/mod.rs b/vortex-roaring/src/boolean/mod.rs index 80f4b65701..aa757b7261 100644 --- a/vortex-roaring/src/boolean/mod.rs +++ b/vortex-roaring/src/boolean/mod.rs @@ -10,9 +10,9 @@ use vortex::stats::ArrayStatisticsCompute; use vortex::validity::{ArrayValidity, LogicalValidity, Validity}; use vortex::visitor::{AcceptArrayVisitor, ArrayVisitor}; use vortex::{impl_encoding, ArrayDType, ArrayFlatten, OwnedArray}; +use vortex_dtype::Nullability; +use vortex_dtype::Nullability::NonNullable; use vortex_error::{vortex_bail, vortex_err, VortexResult}; -use vortex_schema::Nullability; -use vortex_schema::Nullability::NonNullable; use Nullability::Nullable; mod compress; diff --git a/vortex-roaring/src/integer/compress.rs b/vortex-roaring/src/integer/compress.rs index e342c400a9..9b16c3d99e 100644 --- a/vortex-roaring/src/integer/compress.rs +++ b/vortex-roaring/src/integer/compress.rs @@ -6,10 +6,10 @@ use vortex::compress::{CompressConfig, CompressCtx, EncodingCompression}; use vortex::ptype::{NativePType, PType}; use vortex::stats::{ArrayStatistics, Stat}; use vortex::{Array, ArrayDType, ArrayDef, IntoArray, OwnedArray, ToStatic}; +use vortex_dtype::DType; +use vortex_dtype::Nullability::NonNullable; +use vortex_dtype::Signedness::Unsigned; use vortex_error::VortexResult; -use vortex_schema::DType; -use vortex_schema::Nullability::NonNullable; -use vortex_schema::Signedness::Unsigned; use crate::{OwnedRoaringIntArray, RoaringInt, RoaringIntArray, RoaringIntEncoding}; diff --git a/vortex-roaring/src/integer/mod.rs b/vortex-roaring/src/integer/mod.rs index af3c3bb34a..98ddd57f31 100644 --- a/vortex-roaring/src/integer/mod.rs +++ b/vortex-roaring/src/integer/mod.rs @@ -8,8 +8,8 @@ use vortex::stats::ArrayStatisticsCompute; use vortex::validity::{ArrayValidity, LogicalValidity}; use vortex::visitor::{AcceptArrayVisitor, ArrayVisitor}; use vortex::{impl_encoding, ArrayFlatten, OwnedArray}; +use vortex_dtype::Nullability::NonNullable; use vortex_error::{vortex_bail, vortex_err, VortexResult}; -use vortex_schema::Nullability::NonNullable; mod compress; mod compute; diff --git a/vortex-zigzag/Cargo.toml b/vortex-zigzag/Cargo.toml index b5177f1c05..804c44b16f 100644 --- a/vortex-zigzag/Cargo.toml +++ b/vortex-zigzag/Cargo.toml @@ -17,7 +17,7 @@ vortex-alloc = { path = "../vortex-alloc" } vortex-array = { path = "../vortex-array" } vortex-error = { path = "../vortex-error" } vortex-fastlanes = { path = "../vortex-fastlanes" } -vortex-schema = { path = "../vortex-schema" } +vortex-dtype = { path = "../vortex-dtype" } zigzag = { workspace = true } serde = { workspace = true, features = ["derive"] } diff --git a/vortex-zigzag/src/zigzag.rs b/vortex-zigzag/src/zigzag.rs index 8018c47ca9..99a061f136 100644 --- a/vortex-zigzag/src/zigzag.rs +++ b/vortex-zigzag/src/zigzag.rs @@ -4,8 +4,8 @@ use vortex::stats::ArrayStatisticsCompute; use vortex::validity::{ArrayValidity, LogicalValidity}; use vortex::visitor::{AcceptArrayVisitor, ArrayVisitor}; use vortex::{impl_encoding, ArrayDType, ArrayFlatten, IntoArrayData}; +use vortex_dtype::Signedness; use vortex_error::{vortex_bail, vortex_err, VortexResult}; -use vortex_schema::Signedness; use crate::compress::zigzag_encode;