Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
Improved comparison UTF8
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgecarleitao committed Aug 23, 2021
1 parent ce5fe82 commit dfe5460
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/compute/comparison/utf8.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,9 @@ where
let validity = combine_validities(lhs.validity(), rhs.validity());

let values = lhs
.iter()
.zip(rhs.iter())
.map(|(lhs, rhs)| match (lhs, rhs) {
(Some(lhs), Some(rhs)) => op(lhs, rhs),
_ => false,
});
.values_iter()
.zip(rhs.values_iter())
.map(|(lhs, rhs)| op(lhs, rhs));
let values = Bitmap::from_trusted_len_iter(values);

Ok(BooleanArray::from_data(values, validity))
Expand All @@ -57,10 +54,7 @@ where
{
let validity = lhs.validity().clone();

let values = lhs.iter().map(|lhs| match lhs {
None => false,
Some(lhs) => op(lhs, rhs),
});
let values = lhs.values_iter().map(|lhs| op(lhs, rhs));
let values = Bitmap::from_trusted_len_iter(values);

BooleanArray::from_data(values, validity)
Expand Down

0 comments on commit dfe5460

Please sign in to comment.