Skip to content

Commit

Permalink
Use BitsEq to fix Attribute::eq for float
Browse files Browse the repository at this point in the history
  • Loading branch information
rroelke committed Mar 22, 2024
1 parent f58de44 commit 71479f0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tiledb/api/src/array/attribute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use serde_json::json;
pub use tiledb_sys::Datatype;

use crate::context::Context;
use crate::convert::CAPIConverter;
use crate::convert::{BitsEq, CAPIConverter};
use crate::error::Error;
use crate::filter_list::FilterList;
use crate::fn_typed;
Expand Down Expand Up @@ -295,14 +295,14 @@ impl<'c1, 'c2> PartialEq<Attribute<'c2>> for Attribute<'c1> {
self.fill_value_nullable::<DT>(),
other.fill_value_nullable::<DT>(),
) {
(Ok(mine), Ok(theirs)) => mine == theirs,
(Ok(mine), Ok(theirs)) => mine.bits_eq(&theirs),
_ => false,
}
})
} else {
fn_typed!(self.datatype().unwrap(), DT, {
match (self.fill_value::<DT>(), other.fill_value::<DT>()) {
(Ok(mine), Ok(theirs)) => mine == theirs,
(Ok(mine), Ok(theirs)) => mine.bits_eq(&theirs),
_ => false,
}
})
Expand Down

0 comments on commit 71479f0

Please sign in to comment.