Skip to content

Commit ca5067b

Browse files
committed
Merge
Signed-off-by: Nicholas Gates <nick@nickgates.com>
1 parent 6bc1290 commit ca5067b

File tree

33 files changed

+166
-699
lines changed

33 files changed

+166
-699
lines changed

encodings/pco/src/test.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// SPDX-FileCopyrightText: Copyright the Vortex contributors
33
#![allow(clippy::cast_possible_truncation)]
44

5+
use vortex_array::ArrayContext;
6+
use vortex_array::IntoArray;
7+
use vortex_array::ToCanonical;
58
use vortex_array::arrays::BoolArray;
69
use vortex_array::arrays::PrimitiveArray;
710
use vortex_array::arrow::compute::to_arrow_preferred;
@@ -12,9 +15,6 @@ use vortex_array::session::ArraySession;
1215
use vortex_array::validity::Validity;
1316
use vortex_array::vtable::ArrayVTableExt;
1417
use vortex_array::vtable::ValidityHelper;
15-
use vortex_array::ArrayContext;
16-
use vortex_array::IntoArray;
17-
use vortex_array::ToCanonical;
1818
use vortex_buffer::Buffer;
1919
use vortex_buffer::BufferMut;
2020
use vortex_dtype::DType;

vortex-array/src/array/evaluate.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,23 @@
66
//!
77
//! This module stores expression evaluation logic in the VortexSession.
88
9-
use crate::expr::functions::scalar::ScalarFn;
10-
use crate::expr::functions::FunctionId;
11-
use crate::expr::{functions, ExprId, Expression, ExpressionView};
12-
use crate::{expr, ArrayRef};
139
use std::any::Any;
1410
use std::fmt::Debug;
1511
use std::marker::PhantomData;
1612
use std::sync::Arc;
13+
1714
use vortex_error::VortexResult;
1815
use vortex_utils::aliases::hash_map::HashMap;
1916

17+
use crate::ArrayRef;
18+
use crate::expr;
19+
use crate::expr::ExprId;
20+
use crate::expr::Expression;
21+
use crate::expr::ExpressionView;
22+
use crate::expr::functions;
23+
use crate::expr::functions::FunctionId;
24+
use crate::expr::functions::scalar::ScalarFn;
25+
2026
/// Evaluate an expression against a Vortex array.
2127
///
2228
/// For now, the evaluation logic preserves the existing semi-eager execution model.

vortex-array/src/array/mod.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
pub mod evaluate;
55
mod operator;
6-
pub mod optimizer;
76
mod visitor;
87

98
use std::any::Any;
@@ -19,13 +18,18 @@ pub use visitor::*;
1918
use vortex_buffer::ByteBuffer;
2019
use vortex_dtype::DType;
2120
use vortex_dtype::Nullability;
22-
use vortex_error::vortex_bail;
23-
use vortex_error::vortex_panic;
2421
use vortex_error::VortexExpect;
2522
use vortex_error::VortexResult;
23+
use vortex_error::vortex_bail;
24+
use vortex_error::vortex_panic;
2625
use vortex_mask::Mask;
2726
use vortex_scalar::Scalar;
2827

28+
use crate::ArrayEq;
29+
use crate::ArrayHash;
30+
use crate::Canonical;
31+
use crate::DynArrayEq;
32+
use crate::DynArrayHash;
2933
use crate::arrays::BoolVTable;
3034
use crate::arrays::ConstantVTable;
3135
use crate::arrays::DecimalVTable;
@@ -38,15 +42,16 @@ use crate::arrays::StructVTable;
3842
use crate::arrays::VarBinVTable;
3943
use crate::arrays::VarBinViewVTable;
4044
use crate::builders::ArrayBuilder;
41-
use crate::compute::is_constant_opts;
4245
use crate::compute::ComputeFn;
4346
use crate::compute::Cost;
4447
use crate::compute::InvocationArgs;
4548
use crate::compute::IsConstantOpts;
4649
use crate::compute::Output;
50+
use crate::compute::is_constant_opts;
4751
use crate::expr::stats::Precision;
4852
use crate::expr::stats::Stat;
4953
use crate::expr::stats::StatsProviderExt;
54+
use crate::hash;
5055
use crate::serde::ArrayChildren;
5156
use crate::stats::StatsSetRef;
5257
use crate::vtable::ArrayId;
@@ -58,11 +63,6 @@ use crate::vtable::OperationsVTable;
5863
use crate::vtable::VTable;
5964
use crate::vtable::ValidityVTable;
6065
use crate::vtable::VisitorVTable;
61-
use crate::ArrayHash;
62-
use crate::Canonical;
63-
use crate::DynArrayEq;
64-
use crate::DynArrayHash;
65-
use crate::{hash, ArrayEq};
6666

6767
/// The public API trait for all Vortex arrays.
6868
pub trait Array:

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ use vortex_compute::filter::Filter;
55
use vortex_error::VortexResult;
66
use vortex_vector::bool::BoolVector;
77

8-
use crate::array::optimizer::rules::ArrayParentReduceRule;
8+
use crate::ArrayRef;
9+
use crate::IntoArray;
910
use crate::arrays::BoolArray;
1011
use crate::arrays::BoolVTable;
1112
use crate::arrays::MaskedArray;
1213
use crate::arrays::MaskedVTable;
13-
use crate::execution::kernel;
1414
use crate::execution::BatchKernelRef;
1515
use crate::execution::BindCtx;
16+
use crate::execution::kernel;
17+
use crate::optimizer::rules::ArrayParentReduceRule;
1618
use crate::vtable::OperatorVTable;
1719
use crate::vtable::ValidityHelper;
18-
use crate::ArrayRef;
19-
use crate::IntoArray;
2020

2121
impl OperatorVTable<BoolVTable> for BoolVTable {
2222
fn bind(

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@
22
// SPDX-FileCopyrightText: Copyright the Vortex contributors
33

44
use vortex_compute::filter::Filter;
5-
use vortex_dtype::match_each_decimal_value_type;
65
use vortex_dtype::PrecisionScale;
6+
use vortex_dtype::match_each_decimal_value_type;
77
use vortex_error::VortexResult;
88
use vortex_vector::decimal::DVector;
99

10-
use crate::array::optimizer::rules::ArrayParentReduceRule;
10+
use crate::ArrayRef;
11+
use crate::IntoArray;
1112
use crate::arrays::DecimalArray;
1213
use crate::arrays::DecimalVTable;
1314
use crate::arrays::MaskedArray;
1415
use crate::arrays::MaskedVTable;
15-
use crate::execution::kernel;
1616
use crate::execution::BatchKernelRef;
1717
use crate::execution::BindCtx;
18+
use crate::execution::kernel;
19+
use crate::optimizer::rules::ArrayParentReduceRule;
1820
use crate::vtable::OperatorVTable;
1921
use crate::vtable::ValidityHelper;
20-
use crate::ArrayRef;
21-
use crate::IntoArray;
2222

2323
impl OperatorVTable<DecimalVTable> for DecimalVTable {
2424
fn bind(

vortex-array/src/arrays/expr/vtable/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ use std::fmt::Debug;
1010

1111
use vortex_buffer::BufferHandle;
1212
use vortex_dtype::DType;
13-
use vortex_error::vortex_bail;
1413
use vortex_error::VortexResult;
14+
use vortex_error::vortex_bail;
1515
use vortex_vector::Vector;
1616

17+
use crate::Array;
18+
use crate::ArrayOperator;
1719
use crate::arrays::expr::ExprArray;
1820
use crate::execution::ExecutionCtx;
1921
use crate::expr::Expression;
@@ -24,8 +26,6 @@ use crate::vtable::ArrayVTable;
2426
use crate::vtable::ArrayVTableExt;
2527
use crate::vtable::NotSupported;
2628
use crate::vtable::VTable;
27-
use crate::Array;
28-
use crate::ArrayOperator;
2929

3030
vtable!(Expr);
3131

vortex-array/src/arrays/masked/vtable/mod.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,14 @@ mod validity;
1010
use vortex_buffer::BufferHandle;
1111
use vortex_compute::mask::MaskValidity;
1212
use vortex_dtype::DType;
13-
use vortex_error::vortex_bail;
1413
use vortex_error::VortexResult;
14+
use vortex_error::vortex_bail;
1515
use vortex_vector::Vector;
1616

17+
use crate::ArrayBufferVisitor;
18+
use crate::ArrayChildVisitor;
19+
use crate::ArrayOperator;
20+
use crate::EmptyMetadata;
1721
use crate::arrays::masked::MaskedArray;
1822
use crate::execution::ExecutionCtx;
1923
use crate::serde::ArrayChildren;
@@ -26,10 +30,6 @@ use crate::vtable::NotSupported;
2630
use crate::vtable::VTable;
2731
use crate::vtable::ValidityVTableFromValidityHelper;
2832
use crate::vtable::VisitorVTable;
29-
use crate::ArrayBufferVisitor;
30-
use crate::ArrayChildVisitor;
31-
use crate::ArrayOperator;
32-
use crate::EmptyMetadata;
3333

3434
vtable!(Masked);
3535

@@ -119,15 +119,15 @@ mod tests {
119119
use rstest::rstest;
120120
use vortex_buffer::ByteBufferMut;
121121

122+
use crate::ArrayContext;
123+
use crate::IntoArray;
122124
use crate::arrays::MaskedArray;
123125
use crate::arrays::MaskedVTable;
124126
use crate::arrays::PrimitiveArray;
125127
use crate::serde::ArrayParts;
126128
use crate::serde::SerializeOptions;
127129
use crate::validity::Validity;
128130
use crate::vtable::ArrayVTableExt;
129-
use crate::ArrayContext;
130-
use crate::IntoArray;
131131

132132
#[rstest]
133133
#[case(

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ use vortex_dtype::match_each_native_ptype;
77
use vortex_error::VortexResult;
88
use vortex_vector::primitive::PVector;
99

10-
use crate::array::optimizer::rules::ArrayParentReduceRule;
10+
use crate::ArrayRef;
11+
use crate::IntoArray;
1112
use crate::arrays::MaskedArray;
1213
use crate::arrays::MaskedVTable;
1314
use crate::arrays::PrimitiveArray;
1415
use crate::arrays::PrimitiveVTable;
15-
use crate::execution::kernel;
1616
use crate::execution::BatchKernelRef;
1717
use crate::execution::BindCtx;
18+
use crate::execution::kernel;
19+
use crate::optimizer::rules::ArrayParentReduceRule;
1820
use crate::vtable::OperatorVTable;
1921
use crate::vtable::ValidityHelper;
20-
use crate::ArrayRef;
21-
use crate::IntoArray;
2222

2323
impl OperatorVTable<PrimitiveVTable> for PrimitiveVTable {
2424
fn bind(

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

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@
44
use std::sync::Arc;
55

66
use vortex_error::VortexResult;
7-
use vortex_vector::struct_::StructVector;
87
use vortex_vector::Vector;
8+
use vortex_vector::struct_::StructVector;
99

10-
use crate::array::optimizer::rules::ArrayParentReduceRule;
10+
use crate::ArrayRef;
11+
use crate::arrays::StructArray;
12+
use crate::arrays::StructVTable;
1113
use crate::arrays::expr::ExprArray;
1214
use crate::arrays::expr::ExprVTable;
1315
use crate::arrays::struct_::vtable::reduce::apply_partitioned_expr;
1416
use crate::arrays::struct_::vtable::reduce::partition_struct_expr;
15-
use crate::arrays::StructArray;
16-
use crate::arrays::StructVTable;
17-
use crate::execution::kernel;
1817
use crate::execution::BatchKernelRef;
1918
use crate::execution::BindCtx;
19+
use crate::execution::kernel;
2020
use crate::expr::session::ExprSession;
21+
use crate::optimizer::rules::ArrayParentReduceRule;
2122
use crate::vtable::OperatorVTable;
2223
use crate::vtable::ValidityHelper;
23-
use crate::ArrayRef;
2424

2525
impl OperatorVTable<StructVTable> for StructVTable {
2626
fn bind(
@@ -82,10 +82,6 @@ impl ArrayParentReduceRule<StructVTable, ExprVTable> for StructExprPartitionRule
8282

8383
#[cfg(test)]
8484
mod tests {
85-
<<<<<<< HEAD
86-
use crate::session::ArraySession;
87-
=======
88-
>>>>>>> develop
8985
use vortex_dtype::FieldNames;
9086
use vortex_dtype::Nullability::NonNullable;
9187
use vortex_dtype::PTypeDowncast;
@@ -94,11 +90,13 @@ mod tests {
9490
use vortex_vector::VectorOps;
9591

9692
use super::*;
97-
use crate::arrays::expr::ExprVTable;
93+
use crate::Array;
94+
use crate::IntoArray;
9895
use crate::arrays::BoolArray;
9996
use crate::arrays::ExprArray;
10097
use crate::arrays::PrimitiveArray;
10198
use crate::arrays::StructArray;
99+
use crate::arrays::expr::ExprVTable;
102100
use crate::assert_arrays_eq;
103101
use crate::expr::and;
104102
use crate::expr::col;
@@ -109,9 +107,8 @@ mod tests {
109107
use crate::expr::lt;
110108
use crate::expr::pack;
111109
use crate::expr::root;
110+
use crate::session::ArraySession;
112111
use crate::validity::Validity;
113-
use crate::Array;
114-
use crate::IntoArray;
115112

116113
#[test]
117114
fn test_struct_operator_basic() {

vortex-array/src/expr/exprs/cast/mod.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,24 @@ use std::ops::Deref;
66

77
use prost::Message;
88
use vortex_dtype::DType;
9-
use vortex_error::vortex_bail;
10-
use vortex_error::vortex_err;
119
use vortex_error::VortexExpect;
1210
use vortex_error::VortexResult;
11+
use vortex_error::vortex_bail;
12+
use vortex_error::vortex_err;
1313
use vortex_proto::expr as pb;
1414
use vortex_vector::Vector;
1515

16+
use crate::ArrayRef;
1617
use crate::compute::cast as compute_cast;
17-
use crate::expr::expression::Expression;
18-
use crate::expr::stats::Stat;
1918
use crate::expr::ChildName;
2019
use crate::expr::ExecutionArgs;
2120
use crate::expr::ExprId;
2221
use crate::expr::ExpressionView;
2322
use crate::expr::StatsCatalog;
2423
use crate::expr::VTable;
2524
use crate::expr::VTableExt;
26-
use crate::ArrayRef;
25+
use crate::expr::expression::Expression;
26+
use crate::expr::stats::Stat;
2727

2828
/// A cast expression that converts values to a target data type.
2929
pub struct Cast;
@@ -166,12 +166,12 @@ mod tests {
166166
use vortex_error::VortexUnwrap as _;
167167

168168
use super::cast;
169+
use crate::IntoArray;
169170
use crate::arrays::StructArray;
171+
use crate::expr::Expression;
170172
use crate::expr::exprs::get_item::get_item;
171173
use crate::expr::exprs::root::root;
172174
use crate::expr::test_harness;
173-
use crate::expr::Expression;
174-
use crate::IntoArray;
175175

176176
#[test]
177177
fn dtype() {

0 commit comments

Comments
 (0)