Skip to content

Commit 3e37c28

Browse files
committed
u
Signed-off-by: Joe Isaacs <[email protected]>
1 parent 362c8c7 commit 3e37c28

File tree

3 files changed

+4
-13
lines changed

3 files changed

+4
-13
lines changed

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

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,12 @@ impl ArrayVTable<ExprVTable> for ExprVTable {
2727
fn array_hash<H: std::hash::Hasher>(array: &ExprArray, state: &mut H, precision: Precision) {
2828
array.child.array_hash(state, precision);
2929
array.dtype.hash(state);
30-
// TODO(joe): fixme
31-
array
32-
.expr
33-
.serialize_metadata()
34-
.unwrap_or(None)
35-
.unwrap_or_default()
36-
.hash(state)
37-
// Note: Expression doesn't implement Hash, so we skip it
38-
// This is acceptable since expressions are typically transient
30+
array.expr.hash(state)
3931
}
4032

4133
fn array_eq(array: &ExprArray, other: &ExprArray, precision: Precision) -> bool {
4234
array.child.array_eq(&other.child, precision)
4335
&& array.dtype == other.dtype
44-
// TODO(joe): fixme
45-
&& array.expr.serialize_metadata().unwrap_or(None) == other.expr.serialize_metadata().unwrap_or(None)
36+
&& array.expr == other.expr
4637
}
4738
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ mod tests {
5353

5454
let expr = get_item("a", pack([("a", root())], Nullability::NonNullable));
5555

56-
let expr_array = ExprArray::new_infer_dtype(array.clone().into_array(), expr.clone())?;
56+
let expr_array = ExprArray::new_infer_dtype(array.into_array(), expr)?;
5757

5858
// Call reduce - it should optimize pack(a: $).a to just $
5959
let reduced = expr_array.reduce()?.vortex_expect("reduce failed");

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ mod tests {
238238

239239
let expr = gt(get_item("a", root()), lit(5));
240240
let expr_array =
241-
ExprArray::new_infer_dtype(struct_array.clone().into_array(), expr.clone())?;
241+
ExprArray::new_infer_dtype(struct_array.clone().into_array(), expr)?;
242242

243243
let actual = expr_array.to_canonical().into_array();
244244
let expected = (0..5)

0 commit comments

Comments
 (0)