Skip to content

Commit da62109

Browse files
committed
Flat Layout Execution
Signed-off-by: Nicholas Gates <[email protected]>
1 parent 8f2d3e9 commit da62109

File tree

10 files changed

+50
-50
lines changed

10 files changed

+50
-50
lines changed

vortex-array/src/expr/exprs/between.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,26 @@ use std::fmt::Formatter;
66
use prost::Message;
77
use vortex_dtype::DType;
88
use vortex_dtype::DType::Bool;
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::Datum;
1515

16-
use crate::compute::between as between_compute;
16+
use crate::ArrayRef;
1717
use crate::compute::BetweenOptions;
18-
use crate::expr::expression::Expression;
19-
use crate::expr::exprs::binary::Binary;
20-
use crate::expr::exprs::operators::Operator;
18+
use crate::compute::between as between_compute;
2119
use crate::expr::Arity;
2220
use crate::expr::ChildName;
2321
use crate::expr::ExecutionArgs;
2422
use crate::expr::ExprId;
2523
use crate::expr::StatsCatalog;
2624
use crate::expr::VTable;
2725
use crate::expr::VTableExt;
28-
use crate::ArrayRef;
26+
use crate::expr::expression::Expression;
27+
use crate::expr::exprs::binary::Binary;
28+
use crate::expr::exprs::operators::Operator;
2929

3030
/// An optimized scalar expression to compute whether values fall between two bounds.
3131
///

vortex-array/src/expr/exprs/binary.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,16 @@ use vortex_compute::arithmetic::Div;
1313
use vortex_compute::arithmetic::Mul;
1414
use vortex_compute::arithmetic::Sub;
1515
use vortex_dtype::DType;
16-
use vortex_error::vortex_bail;
17-
use vortex_error::vortex_err;
1816
use vortex_error::VortexExpect;
1917
use vortex_error::VortexResult;
18+
use vortex_error::vortex_bail;
19+
use vortex_error::vortex_err;
2020
use vortex_proto::expr as pb;
2121
use vortex_vector::Datum;
2222
use vortex_vector::PrimitiveDatum;
2323
use vortex_vector::Vector;
2424

25+
use crate::ArrayRef;
2526
use crate::compute;
2627
use crate::compute::add;
2728
use crate::compute::and_kleene;
@@ -30,18 +31,17 @@ use crate::compute::div;
3031
use crate::compute::mul;
3132
use crate::compute::or_kleene;
3233
use crate::compute::sub;
33-
use crate::expr::expression::Expression;
34-
use crate::expr::exprs::literal::lit;
35-
use crate::expr::exprs::operators::Operator;
36-
use crate::expr::stats::Stat;
3734
use crate::expr::Arity;
3835
use crate::expr::ChildName;
3936
use crate::expr::ExecutionArgs;
4037
use crate::expr::ExprId;
4138
use crate::expr::StatsCatalog;
4239
use crate::expr::VTable;
4340
use crate::expr::VTableExt;
44-
use crate::ArrayRef;
41+
use crate::expr::expression::Expression;
42+
use crate::expr::exprs::literal::lit;
43+
use crate::expr::exprs::operators::Operator;
44+
use crate::expr::stats::Stat;
4545

4646
pub struct Binary;
4747

@@ -617,10 +617,10 @@ mod tests {
617617
use super::lt_eq;
618618
use super::not_eq;
619619
use super::or;
620+
use crate::expr::Expression;
620621
use crate::expr::exprs::get_item::col;
621622
use crate::expr::exprs::literal::lit;
622623
use crate::expr::test_harness;
623-
use crate::expr::Expression;
624624

625625
#[test]
626626
fn and_collect_left_assoc() {

vortex-array/src/expr/exprs/like.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,23 @@ use std::fmt::Formatter;
55

66
use prost::Message;
77
use vortex_dtype::DType;
8+
use vortex_error::VortexResult;
89
use vortex_error::vortex_bail;
910
use vortex_error::vortex_err;
10-
use vortex_error::VortexResult;
1111
use vortex_proto::expr as pb;
12-
use vortex_vector::bool::BoolVector;
1312
use vortex_vector::Datum;
13+
use vortex_vector::bool::BoolVector;
1414

15-
use crate::compute::like as like_compute;
15+
use crate::ArrayRef;
1616
use crate::compute::LikeOptions;
17+
use crate::compute::like as like_compute;
1718
use crate::expr::Arity;
1819
use crate::expr::ChildName;
1920
use crate::expr::ExecutionArgs;
2021
use crate::expr::ExprId;
2122
use crate::expr::Expression;
2223
use crate::expr::VTable;
2324
use crate::expr::VTableExt;
24-
use crate::ArrayRef;
2525

2626
/// Expression that performs SQL LIKE pattern matching.
2727
pub struct Like;
@@ -180,14 +180,14 @@ mod tests {
180180
use vortex_dtype::DType;
181181
use vortex_dtype::Nullability;
182182

183+
use crate::ToCanonical;
183184
use crate::arrays::BoolArray;
184185
use crate::expr::exprs::get_item::get_item;
185186
use crate::expr::exprs::like::like;
186187
use crate::expr::exprs::like::not_ilike;
187188
use crate::expr::exprs::literal::lit;
188189
use crate::expr::exprs::not::not;
189190
use crate::expr::exprs::root::root;
190-
use crate::ToCanonical;
191191

192192
#[test]
193193
fn invert_booleans() {

vortex-array/src/expr/exprs/list_contains.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,12 @@ use std::fmt::Formatter;
55
use std::ops::BitOr;
66

77
use vortex_dtype::DType;
8-
use vortex_error::vortex_bail;
98
use vortex_error::VortexResult;
9+
use vortex_error::vortex_bail;
1010
use vortex_vector::Datum;
1111

12+
use crate::ArrayRef;
1213
use crate::compute::list_contains as compute_list_contains;
13-
use crate::expr::exprs::binary::and;
14-
use crate::expr::exprs::binary::gt;
15-
use crate::expr::exprs::binary::lt;
16-
use crate::expr::exprs::binary::or;
17-
use crate::expr::exprs::literal::lit;
18-
use crate::expr::exprs::literal::Literal;
1914
use crate::expr::Arity;
2015
use crate::expr::ChildName;
2116
use crate::expr::EmptyOptions;
@@ -25,7 +20,12 @@ use crate::expr::Expression;
2520
use crate::expr::StatsCatalog;
2621
use crate::expr::VTable;
2722
use crate::expr::VTableExt;
28-
use crate::ArrayRef;
23+
use crate::expr::exprs::binary::and;
24+
use crate::expr::exprs::binary::gt;
25+
use crate::expr::exprs::binary::lt;
26+
use crate::expr::exprs::binary::or;
27+
use crate::expr::exprs::literal::Literal;
28+
use crate::expr::exprs::literal::lit;
2929

3030
pub struct ListContains;
3131

@@ -179,6 +179,9 @@ mod tests {
179179
use vortex_utils::aliases::hash_set::HashSet;
180180

181181
use super::list_contains;
182+
use crate::Array;
183+
use crate::ArrayRef;
184+
use crate::IntoArray;
182185
use crate::arrays::BoolArray;
183186
use crate::arrays::ListArray;
184187
use crate::arrays::PrimitiveArray;
@@ -193,9 +196,6 @@ mod tests {
193196
use crate::expr::pruning::checked_pruning_expr;
194197
use crate::expr::stats::Stat;
195198
use crate::validity::Validity;
196-
use crate::Array;
197-
use crate::ArrayRef;
198-
use crate::IntoArray;
199199

200200
fn test_array() -> ArrayRef {
201201
ListArray::try_new(

vortex-vector/src/arrow/bool.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ use arrow_array::Array;
99
use arrow_array::ArrayRef;
1010
use arrow_array::BooleanArray;
1111
use vortex_buffer::BitBuffer;
12-
use vortex_error::vortex_err;
1312
use vortex_error::VortexError;
13+
use vortex_error::vortex_err;
1414

1515
impl TryFrom<BoolVector> for ArrayRef {
1616
type Error = VortexError;

vortex-vector/src/binaryview/scalar.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
// SPDX-License-Identifier: Apache-2.0
22
// SPDX-FileCopyrightText: Copyright the Vortex contributors
33

4+
use crate::Scalar;
5+
use crate::ScalarOps;
6+
use crate::VectorMut;
7+
use crate::VectorMutOps;
48
use crate::binaryview::BinaryType;
59
use crate::binaryview::BinaryViewType;
610
use crate::binaryview::BinaryViewTypeUpcast;
711
use crate::binaryview::BinaryViewVectorMut;
812
use crate::binaryview::StringType;
9-
use crate::Scalar;
10-
use crate::ScalarOps;
11-
use crate::VectorMut;
12-
use crate::VectorMutOps;
1313

1414
/// A scalar value for types that implement [`BinaryViewType`].
1515
#[derive(Clone, Debug)]

vortex-vector/src/binaryview/vector_mut.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ use std::sync::Arc;
88
use vortex_buffer::BufferMut;
99
use vortex_buffer::ByteBuffer;
1010
use vortex_buffer::ByteBufferMut;
11-
use vortex_error::vortex_ensure;
1211
use vortex_error::VortexExpect;
1312
use vortex_error::VortexResult;
13+
use vortex_error::vortex_ensure;
1414
use vortex_mask::MaskMut;
1515

16-
use crate::binaryview::vector::BinaryViewVector;
17-
use crate::binaryview::view::validate_views;
18-
use crate::binaryview::view::BinaryView;
19-
use crate::binaryview::BinaryViewScalar;
20-
use crate::binaryview::BinaryViewType;
2116
use crate::VectorMutOps;
2217
use crate::VectorOps;
18+
use crate::binaryview::BinaryViewScalar;
19+
use crate::binaryview::BinaryViewType;
20+
use crate::binaryview::vector::BinaryViewVector;
21+
use crate::binaryview::view::BinaryView;
22+
use crate::binaryview::view::validate_views;
2323

2424
// Default capacity for new string data buffers of 2MiB.
2525
const BUFFER_CAPACITY: usize = 2 * 1024 * 1024;
@@ -316,17 +316,17 @@ mod tests {
316316
use std::ops::Deref;
317317
use std::sync::Arc;
318318

319+
use vortex_buffer::ByteBuffer;
319320
use vortex_buffer::buffer;
320321
use vortex_buffer::buffer_mut;
321-
use vortex_buffer::ByteBuffer;
322322
use vortex_mask::Mask;
323323
use vortex_mask::MaskMut;
324324

325-
use crate::binaryview::view::BinaryView;
326-
use crate::binaryview::StringVector;
327-
use crate::binaryview::StringVectorMut;
328325
use crate::VectorMutOps;
329326
use crate::VectorOps;
327+
use crate::binaryview::StringVector;
328+
use crate::binaryview::StringVectorMut;
329+
use crate::binaryview::view::BinaryView;
330330

331331
#[test]
332332
fn test_basic() {

vortex-vector/src/bool/scalar.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// SPDX-License-Identifier: Apache-2.0
22
// SPDX-FileCopyrightText: Copyright the Vortex contributors
33

4-
use crate::bool::BoolVectorMut;
54
use crate::Scalar;
65
use crate::ScalarOps;
76
use crate::VectorMut;
87
use crate::VectorMutOps;
8+
use crate::bool::BoolVectorMut;
99

1010
/// A scalar value for boolean types.
1111
#[derive(Clone, Debug)]

vortex-vector/src/listview/scalar.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// SPDX-License-Identifier: Apache-2.0
22
// SPDX-FileCopyrightText: Copyright the Vortex contributors
33

4-
use crate::listview::ListViewVector;
5-
use crate::listview::ListViewVectorMut;
64
use crate::Scalar;
75
use crate::ScalarOps;
86
use crate::VectorMut;
97
use crate::VectorOps;
8+
use crate::listview::ListViewVector;
9+
use crate::listview::ListViewVectorMut;
1010
use std::sync::Arc;
1111
use vortex_mask::Mask;
1212
use vortex_mask::MaskMut;

vortex-vector/src/scalar_ops.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// SPDX-License-Identifier: Apache-2.0
22
// SPDX-FileCopyrightText: Copyright the Vortex contributors
33

4-
use crate::private;
54
use crate::Scalar;
65
use crate::VectorMut;
6+
use crate::private;
77

88
/// Trait for scalar operations.
99
pub trait ScalarOps: private::Sealed + Sized + Into<Scalar> {

0 commit comments

Comments
 (0)