Skip to content

Commit

Permalink
Revert "Add NullState::is_valid and NullState::is_null"
Browse files Browse the repository at this point in the history
This reverts commit a44dd81.
  • Loading branch information
joroKr21 committed Jul 22, 2024
1 parent a44dd81 commit b1e9c36
Showing 1 changed file with 1 addition and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -324,18 +324,6 @@ impl NullState {
}
}

/// Check if the accumulated value for the group at the given `index` is valid,
/// meaning that there was at least one value passing the filter for this group.
pub fn is_valid(&self, index: usize) -> bool {
self.seen_values.get_bit(index)
}

/// Check if the accumulated value for the group at the given `index` is `null`,
/// meaning that no values passing the filter were seen yet for this group.
pub fn is_null(&self, index: usize) -> bool {
!self.is_valid(index)
}

/// Creates the a [`NullBuffer`] representing which group_indices
/// should have null values (because they never saw any values)
/// for the `emit_to` rows.
Expand Down Expand Up @@ -840,12 +828,9 @@ mod test {

// Validate the final buffer (one value per group)
let expected_null_buffer = mock.expected_null_buffer(total_num_groups);
for (i, expected) in expected_null_buffer.iter().enumerate() {
assert_eq!(expected, null_state.is_valid(i));
assert_eq!(!expected, null_state.is_null(i))
}

let null_buffer = null_state.build(EmitTo::All);

assert_eq!(null_buffer, expected_null_buffer);
}
}
Expand Down

0 comments on commit b1e9c36

Please sign in to comment.