Skip to content

Commit 7ff7f6f

Browse files
committed
all logical bool implementations + refactor
Signed-off-by: Connor Tsui <[email protected]>
1 parent 366b694 commit 7ff7f6f

File tree

10 files changed

+1097
-678
lines changed

10 files changed

+1097
-678
lines changed

vortex-array/src/scalar_fns/binary/mod.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,16 @@ impl VTable for BinaryFn {
101101
Operator::Lte => Ok(Compare::<LessThanOrEqual>::compare(lhs, rhs).into()),
102102
Operator::Gt => Ok(Compare::<GreaterThan>::compare(lhs, rhs).into()),
103103
Operator::Gte => Ok(Compare::<GreaterThanOrEqual>::compare(lhs, rhs).into()),
104-
Operator::And => Ok(<BoolDatum as LogicalOp<KleeneAnd>>::op(
105-
lhs.into_bool(),
106-
rhs.into_bool(),
104+
Operator::And => Ok(<&BoolDatum as LogicalOp<KleeneAnd>>::op(
105+
&lhs.into_bool(),
106+
&rhs.into_bool(),
107+
)
108+
.into()),
109+
Operator::Or => Ok(<&BoolDatum as LogicalOp<KleeneOr>>::op(
110+
&lhs.into_bool(),
111+
&rhs.into_bool(),
107112
)
108113
.into()),
109-
Operator::Or => {
110-
Ok(<BoolDatum as LogicalOp<KleeneOr>>::op(lhs.into_bool(), rhs.into_bool()).into())
111-
}
112114
Operator::Add | Operator::Sub | Operator::Mul | Operator::Div => {
113115
execute_arithmetic_primitive(lhs.into_primitive(), rhs.into_primitive(), *op)
114116
}

vortex-compute/src/logical/and.rs

Lines changed: 0 additions & 57 deletions
This file was deleted.

vortex-compute/src/logical/and_kleene.rs

Lines changed: 0 additions & 218 deletions
This file was deleted.

vortex-compute/src/logical/and_not.rs

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)