Skip to content
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

[SQL] Prevent SQRT(negative value) in STDDEV due to unstable FP computations #1908

Merged
merged 1 commit into from
Jun 20, 2024

Conversation

mihaibudiu
Copy link
Collaborator

Is this a user-visible change (yes/no): no

Fixes #1904

…tations

Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
@mihaibudiu
Copy link
Collaborator Author

The current solution is to take max(0, value) before applying the sqrt.
perhaps there's an algorithm with lower error for computing stddev.

@mihaibudiu
Copy link
Collaborator Author

unrelated CI failure

@lalithsuresh
Copy link
Collaborator

This would be a user facing change though.

@mihaibudiu
Copy link
Collaborator Author

No, it's a bug fix

@abhizer abhizer merged commit 74e7f73 into main Jun 20, 2024
4 of 5 checks passed
@abhizer abhizer deleted the issue1904 branch June 20, 2024 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SQL: STDDEV(DOUBLE) sometimes panics because SQRT cannot be taken of a negative number
3 participants