Skip to content

Commit d2af6a0

Browse files
committed
feat[vortex-array]: add an expr array
Signed-off-by: Joe Isaacs <[email protected]>
1 parent 4e0c3c8 commit d2af6a0

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,15 @@ mod tests {
3434
fn test_expr_array_canonicalize() {
3535
let child = PrimitiveArray::new(buffer![1i32, 2, 3], Validity::NonNullable).into_array();
3636

37-
// Create an expression: lit(10) + lit(5) = 15
3837
// This expression doesn't use the child, but demonstrates the ExprArray mechanics
3938
let expr = checked_add(lit(10), lit(5));
4039

41-
// Create ExprArray with the expression
4240
let dtype = DType::Primitive(PType::I32, NonNullable);
4341
let expr_array = ExprArray::try_new(child, expr, dtype).unwrap();
44-
let array = expr_array.into_array();
4542

46-
// Test canonicalize - should evaluate the expression
47-
let canonical = array.to_canonical().into_array();
43+
let actual = expr_array.to_canonical().into_array();
4844

4945
let expect = (0..3).map(|_| 15i32).collect::<PrimitiveArray>();
50-
assert_eq!(expect, canonical);
46+
assert_eq!(expect, actual);
5147
}
5248
}

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ impl OperatorVTable<ExprVTable> for ExprVTable {
3939

4040
#[cfg(test)]
4141
mod tests {
42-
#![allow(clippy::redundant_clone)]
4342

4443
use vortex_dtype::Nullability;
4544
use vortex_error::VortexExpect;

vortex-layout/src/layouts/struct_/reader.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ impl StructReader {
187187

188188
/// When partitioning an expression, in the case it only has a single partition we can avoid
189189
/// some cost and just delegate to the child reader directly.
190+
// TODO(joe): this is a duplicate of the Partitioned enum in arrays/expr/vtable/operator.rs
190191
#[derive(Clone)]
191192
enum Partitioned {
192193
/// An expression which only operates over a single field

0 commit comments

Comments
 (0)