-
Notifications
You must be signed in to change notification settings - Fork 296
[CHORE] Fix flaky test in test_decimal_to_decimal_cast #3243
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
Conversation
CodSpeed Performance ReportMerging #3243 will not alter performanceComparing Summary
|
@@ -2352,6 +2352,9 @@ mod tests { | |||
|
|||
let scale: usize = rng.gen_range(0..=MAX_SCALE); |
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.
would it simpler to set the lower bound for scale to 1 instead?
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.
I considered that too. I think 0 is a valid scale, thus I prefer to include that in the test.
WDYT? I'm OK to set the lower bound to 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.
IMO keeping the lower bound of the scale to 0 is fine.
I would say instead of doing EPSILON * factor
below, simply doing
let epsilon = if scale == 0 { 1.0 } else { 0.1 };
would be easier
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.
Good point, let me fix it.
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.
Thanks! Looks good
7cf339b
to
41ac479
Compare
@@ -2352,6 +2352,9 @@ mod tests { | |||
|
|||
let scale: usize = rng.gen_range(0..=MAX_SCALE); |
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.
Thanks! Looks good
I noticed this failure on another PR's CI run: https://github.com/Eventual-Inc/Daft/actions/runs/11715735385/job/32632612788?pr=3134
This is a flaky test and should be fixed.