Skip to content

Commit 6272761

Browse files
author
Kanishk Sachan
committed
revert: restore original assert_eq in binary statistics test
1 parent dd3ff33 commit 6272761

1 file changed

Lines changed: 4 additions & 16 deletions

File tree

  • datafusion/physical-expr/src/expressions

datafusion/physical-expr/src/expressions/binary.rs

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4889,22 +4889,10 @@ mod tests {
48894889
);
48904890

48914891
// The probability of being distinct is 1 - 1 / 16 = 15 / 16.
4892-
let got = neq.evaluate_statistics(&[left_stat, right_stat])?;
4893-
let expected = Distribution::new_bernoulli(ScalarValue::from(15.0 / 16.0))?;
4894-
match (got, expected) {
4895-
(Bernoulli(g), Bernoulli(e)) => {
4896-
let gp = match g.p_value() {
4897-
ScalarValue::Float64(Some(v)) => v,
4898-
_ => panic!("got unexpected p type"),
4899-
};
4900-
let ep = match e.p_value() {
4901-
ScalarValue::Float64(Some(v)) => v,
4902-
_ => panic!("expected unexpected p type"),
4903-
};
4904-
assert!((gp - ep).abs() < 1e-12);
4905-
}
4906-
_ => panic!("unexpected distribution variants"),
4907-
}
4892+
assert_eq!(
4893+
neq.evaluate_statistics(&[left_stat, right_stat])?,
4894+
Distribution::new_bernoulli(ScalarValue::from(15.0 / 16.0))?
4895+
);
49084896

49094897
Ok(())
49104898
}

0 commit comments

Comments
 (0)