forked from apache/doris
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fix](function) avoid calculating sqrt of negative in agg function CO…
…RR (apache#39324) Issue Number: close #xxx before: ```sql mysql [sqlfunctest]>SELECT CORR(data, 89.999999) FROM DOUBLEDATA_NOT_EMPTY_NULLABLE; +---------------------------------------+ | corr(data, cast(89.999999 as DOUBLE)) | +---------------------------------------+ | NULL | +---------------------------------------+ 1 row in set (0.53 sec) ``` --- actually here's a silent nan by float exception. now sure in all platform. after: ```sql mysql [sqlfunctest]>SELECT CORR(data, 89.999999) FROM DOUBLEDATA_NOT_EMPTY_NULLABLE; +---------------------------------------+ | corr(data, cast(89.999999 as DOUBLE)) | +---------------------------------------+ | 0 | +---------------------------------------+ 1 row in set (0.13 sec) ``` --- is stable
- Loading branch information
Showing
3 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters