Skip to content

Commit d2272a3

Browse files
authored
Chore: Reorganize documentation and modules for vectors (#5186)
Tracking Issue: #5028 Now that we have basically all of the vectors (`List`s incoming later today), the crate namespace is getting super crowded. This PR removes the re-exporting into the crate level and makes all vectors accessible via the vortex-vector submodules. Additionally, this moves the main examples for each vector type into their respective modules (rather than on the mutable vector type directly). This is a **purely cosmetic change** that makes it easier to navigate the documentation of `vortex-vector`. Given that this is effectively going to be Vortex's IR, I think it is important to be more careful about what we put into the top-level namespace. If people don't like having to type out an extra word when importing, then I would suggest we add a `prelude` rather than forcing everything at the top level. --------- Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
1 parent b157d2c commit d2272a3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+701
-611
lines changed

encodings/sequence/src/operator.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ use vortex_array::vtable::OperatorVTable;
1010
use vortex_dtype::{NativePType, match_each_native_ptype};
1111
use vortex_error::{VortexExpect, VortexResult};
1212
use vortex_mask::AllOr;
13-
use vortex_vector::{PVectorMut, Vector, VectorMutOps};
13+
use vortex_vector::primitive::PVectorMut;
14+
use vortex_vector::{Vector, VectorMutOps};
1415

1516
use crate::{SequenceArray, SequenceVTable};
1617

vortex-array/src/arrays/bool/vtable/operator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
use vortex_compute::filter::Filter;
55
use vortex_error::VortexResult;
6-
use vortex_vector::BoolVector;
6+
use vortex_vector::bool::BoolVector;
77

88
use crate::arrays::{BoolArray, BoolVTable, MaskedVTable};
99
use crate::execution::{BatchKernelRef, BindCtx, kernel};

vortex-array/src/arrays/null/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use vortex_dtype::DType;
99
use vortex_error::VortexResult;
1010
use vortex_mask::Mask;
1111
use vortex_scalar::Scalar;
12-
use vortex_vector::NullVector;
12+
use vortex_vector::null::NullVector;
1313

1414
use crate::execution::{BatchKernelRef, BindCtx, kernel};
1515
use crate::serde::ArrayChildren;

vortex-array/src/arrays/primitive/array/conversion.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
use vortex_buffer::{BitBufferMut, Buffer, BufferMut};
77
use vortex_dtype::{NativePType, Nullability};
88
use vortex_error::{VortexResult, vortex_ensure, vortex_panic};
9-
use vortex_vector::{PrimitiveVector, VectorOps, match_each_pvector};
9+
use vortex_vector::primitive::PrimitiveVector;
10+
use vortex_vector::{VectorOps, match_each_pvector};
1011

1112
use crate::arrays::PrimitiveArray;
1213
use crate::validity::Validity;
@@ -142,7 +143,7 @@ mod tests {
142143
use vortex_buffer::BufferMut;
143144
use vortex_dtype::{Nullability, PType};
144145
use vortex_mask::MaskMut;
145-
use vortex_vector::PVector;
146+
use vortex_vector::primitive::PVector;
146147

147148
use super::*;
148149

vortex-array/src/arrays/primitive/vtable/operator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
use vortex_compute::filter::Filter;
55
use vortex_dtype::match_each_native_ptype;
66
use vortex_error::VortexResult;
7-
use vortex_vector::PVector;
7+
use vortex_vector::primitive::PVector;
88

99
use crate::arrays::{MaskedVTable, PrimitiveArray, PrimitiveVTable};
1010
use crate::execution::{BatchKernelRef, BindCtx, kernel};

vortex-array/src/arrays/struct_/vtable/operator.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
use std::sync::Arc;
55

66
use vortex_error::VortexResult;
7-
use vortex_vector::{StructVector, Vector};
7+
use vortex_vector::Vector;
8+
use vortex_vector::struct_::StructVector;
89

910
use crate::ArrayRef;
1011
use crate::arrays::{StructArray, StructVTable};

vortex-array/src/compute/arrays/arithmetic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use vortex_compute::arithmetic::{
1212
use vortex_dtype::{DType, NativePType, PTypeDowncastExt, match_each_native_ptype};
1313
use vortex_error::{VortexExpect, VortexResult, vortex_err};
1414
use vortex_scalar::{PValue, Scalar};
15-
use vortex_vector::PVector;
15+
use vortex_vector::primitive::PVector;
1616

1717
use crate::arrays::ConstantArray;
1818
use crate::execution::{BatchKernelRef, BindCtx, kernel};

vortex-array/src/compute/arrays/is_not_null.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ use vortex_dtype::DType;
77
use vortex_dtype::Nullability::NonNullable;
88
use vortex_error::VortexResult;
99
use vortex_mask::Mask;
10-
use vortex_vector::{BoolVector, VectorOps};
10+
use vortex_vector::VectorOps;
11+
use vortex_vector::bool::BoolVector;
1112

1213
use crate::execution::{BatchKernelRef, BindCtx, kernel};
1314
use crate::stats::{ArrayStats, StatsSetRef};

vortex-array/src/compute/arrays/is_null.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ use vortex_dtype::DType;
88
use vortex_dtype::Nullability::NonNullable;
99
use vortex_error::VortexResult;
1010
use vortex_mask::Mask;
11-
use vortex_vector::{BoolVector, VectorOps};
11+
use vortex_vector::VectorOps;
12+
use vortex_vector::bool::BoolVector;
1213

1314
use crate::execution::{BatchKernelRef, BindCtx, kernel};
1415
use crate::stats::{ArrayStats, StatsSetRef};

vortex-array/src/compute/arrays/logical.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use vortex_compute::logical::{
1111
};
1212
use vortex_dtype::DType;
1313
use vortex_error::VortexResult;
14-
use vortex_vector::BoolVector;
14+
use vortex_vector::bool::BoolVector;
1515

1616
use crate::execution::{BatchKernelRef, BindCtx, kernel};
1717
use crate::serde::ArrayChildren;

0 commit comments

Comments
 (0)