Skip to content

Commit

Permalink
Stats result
Browse files Browse the repository at this point in the history
  • Loading branch information
gatesn committed Mar 4, 2024
2 parents faa1741 + 8e9845b commit 7ad1991
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions vortex/src/array/primitive/stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,10 @@ where
let typed_buf: &[T] = array.buffer().typed_data();

// TODO(ngates): add optimized implementation for non-null;
let validity = array
.validity()
.map(|v| cast_bool(v))
.transpose()?
.map_or_else(
|| NullBuffer::new_valid(array.len()),
|v| NullBuffer::from(v.buffer().clone()),
);
let validity = array.validity().map(cast_bool).transpose()?.map_or_else(
|| NullBuffer::new_valid(array.len()),
|v| NullBuffer::from(v.buffer().clone()),
);

// TODO(ngates): bail out on empty stats
let first = if validity.iter().next().unwrap() {
Expand Down

0 comments on commit 7ad1991

Please sign in to comment.