Skip to content

Commit 191228e

Browse files
authored
Move stats into expr (#5582)
Just a reminder, the end state is: ``` vortex-expr/ stats scalar_fn Expr vortex-array -> vortex-expr ScalarFnArray vortex-layout -> vortex-expr ScalarFnLayout ``` Where Expr becomes a closed enum with almost all logic implemented via ScalarFn. --------- Signed-off-by: Nicholas Gates <[email protected]>
1 parent 682289f commit 191228e

File tree

48 files changed

+341
-322
lines changed

Some content is hidden

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

48 files changed

+341
-322
lines changed

encodings/datetime-parts/src/compute/take.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ use vortex_array::compute::TakeKernel;
99
use vortex_array::compute::TakeKernelAdapter;
1010
use vortex_array::compute::fill_null;
1111
use vortex_array::compute::take;
12+
use vortex_array::expr::stats::Stat;
1213
use vortex_array::register_kernel;
13-
use vortex_array::stats::Stat;
1414
use vortex_array::stats::StatsProvider;
1515
use vortex_dtype::Nullability;
1616
use vortex_error::VortexResult;

encodings/fastlanes/src/for/array/for_compress.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use num_traits::PrimInt;
55
use num_traits::WrappingSub;
66
use vortex_array::IntoArray;
77
use vortex_array::arrays::PrimitiveArray;
8-
use vortex_array::stats::Stat;
8+
use vortex_array::expr::stats::Stat;
99
use vortex_dtype::NativePType;
1010
use vortex_dtype::match_each_integer_ptype;
1111
use vortex_error::VortexResult;

encodings/runend/src/compute/is_constant.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ use vortex_array::compute::IsConstantKernel;
66
use vortex_array::compute::IsConstantKernelAdapter;
77
use vortex_array::compute::IsConstantOpts;
88
use vortex_array::compute::is_constant_opts;
9+
use vortex_array::expr::stats::Stat;
910
use vortex_array::register_kernel;
10-
use vortex_array::stats::Stat;
1111
use vortex_error::VortexResult;
1212

1313
use crate::RunEndVTable;

vortex-array/src/array/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ use crate::compute::InvocationArgs;
5050
use crate::compute::IsConstantOpts;
5151
use crate::compute::Output;
5252
use crate::compute::is_constant_opts;
53+
use crate::expr::stats::Stat;
5354
use crate::hash;
5455
use crate::serde::ArrayChildren;
5556
use crate::stats::Precision;
56-
use crate::stats::Stat;
5757
use crate::stats::StatsProviderExt;
5858
use crate::stats::StatsSetRef;
5959
use crate::vtable::ArrayId;

vortex-array/src/arrays/constant/compute/sum.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ use crate::arrays::ConstantArray;
2424
use crate::arrays::ConstantVTable;
2525
use crate::compute::SumKernel;
2626
use crate::compute::SumKernelAdapter;
27+
use crate::expr::stats::Stat;
2728
use crate::register_kernel;
28-
use crate::stats::Stat;
2929

3030
impl SumKernel for ConstantVTable {
3131
fn sum(&self, array: &ConstantArray, accumulator: &Scalar) -> VortexResult<Scalar> {
@@ -184,7 +184,7 @@ mod tests {
184184
use crate::arrays::ConstantArray;
185185
use crate::compute::sum;
186186
use crate::compute::sum_with_accumulator;
187-
use crate::stats::Stat;
187+
use crate::expr::stats::Stat;
188188

189189
#[test]
190190
fn test_sum_unsigned() {

vortex-array/src/arrays/constant/vtable/canonical.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ mod tests {
336336
use crate::arrays::ConstantArray;
337337
use crate::arrays::ListViewRebuildMode;
338338
use crate::canonical::ToCanonical;
339-
use crate::stats::Stat;
339+
use crate::expr::stats::Stat;
340340
use crate::stats::StatsProvider;
341341
use crate::validity::Validity;
342342
use crate::vtable::ValidityHelper;

vortex-array/src/arrays/decimal/compute/sum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ use crate::arrays::DecimalArray;
2121
use crate::arrays::DecimalVTable;
2222
use crate::compute::SumKernel;
2323
use crate::compute::SumKernelAdapter;
24+
use crate::expr::stats::Stat;
2425
use crate::register_kernel;
25-
use crate::stats::Stat;
2626

2727
impl SumKernel for DecimalVTable {
2828
#[expect(

vortex-array/src/arrays/varbin/compute/min_max.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ mod tests {
7070
use crate::arrays::VarBinArray;
7171
use crate::compute::MinMaxResult;
7272
use crate::compute::min_max;
73-
use crate::stats::Stat;
73+
use crate::expr::stats::Stat;
7474
use crate::stats::StatsProvider;
7575

7676
#[test]

vortex-array/src/compute/is_constant.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ use crate::compute::InvocationArgs;
2222
use crate::compute::Kernel;
2323
use crate::compute::Options;
2424
use crate::compute::Output;
25+
use crate::expr::stats::Stat;
2526
use crate::stats::Precision;
26-
use crate::stats::Stat;
2727
use crate::stats::StatsProvider;
2828
use crate::stats::StatsProviderExt;
2929
use crate::vtable::VTable;
@@ -307,7 +307,7 @@ mod tests {
307307

308308
use crate::IntoArray as _;
309309
use crate::arrays::PrimitiveArray;
310-
use crate::stats::Stat;
310+
use crate::expr::stats::Stat;
311311

312312
#[test]
313313
fn is_constant_min_max_no_nan() {

vortex-array/src/compute/is_sorted.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ use crate::compute::InvocationArgs;
2222
use crate::compute::Kernel;
2323
use crate::compute::Options;
2424
use crate::compute::Output;
25+
use crate::expr::stats::Stat;
2526
use crate::stats::Precision;
26-
use crate::stats::Stat;
2727
use crate::stats::StatsProviderExt;
2828
use crate::vtable::VTable;
2929

0 commit comments

Comments
 (0)