-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect row comparison for tpch queries in benchmarks #5784
Conversation
@@ -1106,7 +1106,7 @@ mod ci { | |||
let actual_row = &actual_vec[i]; | |||
assert_eq!(expected_row.len(), actual_row.len()); | |||
|
|||
for j in 0..expected.len() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e.g., If expected
contains only one record batch, we only compare first column between rows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if any existing tests will fail by this.
benchmarks/src/bin/tpch.rs
Outdated
( | ||
ScalarValue::Decimal128(Some(l), _, s), | ||
ScalarValue::Decimal128(Some(r), _, _), | ||
) => { | ||
let tolerance = 0.1; | ||
if ((l - r) as f64 / 10_i32.pow(*s as u32) as f64).abs() | ||
> tolerance | ||
{ | ||
panic!( | ||
"Expected: {}; Actual: {}; Tolerance: {}", | ||
l, r, tolerance | ||
) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is necessary to pass ci::verify_q9
after this change. There is a slight (0.01
) difference.
benchmarks/src/bin/tpch.rs
Outdated
ScalarValue::Decimal128(Some(l), _, s), | ||
ScalarValue::Decimal128(Some(r), _, _), | ||
) => { | ||
let tolerance = 0.1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tolerance is already defined above in the float
path -- maybe we could make it a constant or something. Very minor
Which issue does this PR close?
Closes #5783.
Rationale for this change
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?