File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed
vortex-array/src/arrays/expr/vtable Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,12 @@ impl ArrayVTable<ExprVTable> for ExprVTable {
2828 array. child . array_hash ( state, precision) ;
2929 array. dtype . hash ( state) ;
3030 // TODO(joe): fixme
31- array. expr . serialize_metadata ( ) . hash ( )
31+ array
32+ . expr
33+ . serialize_metadata ( )
34+ . unwrap_or ( None )
35+ . unwrap_or ( vec ! [ ] )
36+ . hash ( state)
3237 // Note: Expression doesn't implement Hash, so we skip it
3338 // This is acceptable since expressions are typically transient
3439 }
@@ -37,6 +42,6 @@ impl ArrayVTable<ExprVTable> for ExprVTable {
3742 array. child . array_eq ( & other. child , precision)
3843 && array. dtype == other. dtype
3944 // TODO(joe): fixme
40- && array. expr . serialize_metadata ( ) == other. expr . serialize_metadata ( )
45+ && array. expr . serialize_metadata ( ) . unwrap_or ( None ) == other. expr . serialize_metadata ( ) . unwrap_or ( None )
4146 }
4247}
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ mod tests {
2828 use crate :: expr:: binary:: checked_add;
2929 use crate :: expr:: literal:: lit;
3030 use crate :: validity:: Validity ;
31- use crate :: { Array , IntoArray } ;
31+ use crate :: { Array , IntoArray , assert_arrays_eq } ;
3232
3333 #[ test]
3434 fn test_expr_array_canonicalize ( ) {
@@ -43,6 +43,6 @@ mod tests {
4343 let actual = expr_array. to_canonical ( ) . into_array ( ) ;
4444
4545 let expect = ( 0 ..3 ) . map ( |_| 15i32 ) . collect :: < PrimitiveArray > ( ) ;
46- assert_eq ! ( expect, actual) ;
46+ assert_arrays_eq ! ( expect, actual) ;
4747 }
4848}
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ use vortex_error::VortexResult;
55
66use crate :: ArrayRef ;
77use crate :: arrays:: expr:: { ExprArray , ExprVTable } ;
8- use crate :: execution:: { BatchKernelRef , BindCtx } ;
98use crate :: expr:: root;
109use crate :: expr:: session:: ExprSession ;
1110use crate :: expr:: transform:: ExprOptimizer ;
You can’t perform that action at this time.
0 commit comments