You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Scalar::is_zero is probably not correct for FixedSizeList and Struct #7891
/// Returns `true` if the [`Scalar`] has a non-null zero value.////// Returns `None` if the scalar is null, otherwise returns `Some(true)` if the value is zero/// and `Some(false)` otherwise.pubfnis_zero(&self) -> Option<bool>{let value = self.value()?;let is_zero = matchself.dtype(){
...DType::FixedSizeList(_, list_size, _) => value.as_list().len() == *list_size asusize,DType::Struct(struct_fields, _) => value.as_list().len() == struct_fields.nfields(),
...};Some(is_zero)}
I'm pretty sure this is wrong. We need to check these are true but also that the elements themselves are zero.
Activity
Fix is_zero() for FixedSizeList and Struct scalar types (#8500)