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

Commit

Permalink
release memory on predicate with 0% selectivity (#1163)
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 authored Jul 13, 2022
1 parent 8c47777 commit a8b526f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compute/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ pub fn filter(array: &dyn Array, filter: &BooleanArray) -> Result<Box<dyn Array>
let false_count = filter.values().unset_bits();
if false_count == filter.len() {
assert_eq!(array.len(), filter.len());
return Ok(array.slice(0, 0));
return Ok(new_empty_array(array.data_type().clone()));
}
if false_count == 0 {
assert_eq!(array.len(), filter.len());
Expand Down

0 comments on commit a8b526f

Please sign in to comment.