Fix regr functions result to be null when the input data is null#22112
Fix regr functions result to be null when the input data is null#22112tdcmeehan merged 1 commit intoprestodb:masterfrom
Conversation
|
@tdcmeehan Would you help review this PR? |
|
Suggest adding a release note entry for this PR following the release notes guidelines. Perhaps something like this accurately describes the work? |
Thanks, done. |
|
Please update the commit message to indicate the bugs we are fixing. Please ensure it follows our guidelines in CONTRIBUTING.md |
| double result = getRegressionSxy(state); | ||
| if (Double.isFinite(result)) { | ||
| double count = getRegressionCount(state); | ||
| if (Double.isFinite(result) && Double.isFinite(count) && count > 0) { |
There was a problem hiding this comment.
If the count is not finite, should it throw?
There was a problem hiding this comment.
If the count is not finite, the result should be null, which is consistent with the behavior of the regr_count function.
|
@tdcmeehan Could you help me review this, thank you. |
|
@8dukongjian please rebase to remove the merge commit. Then we can merge. |
Done, Thanks! |
Description
The result of the regr_count function should be null when the input data is null, not 0. The same problem exists with regr_avgx, regr_avgy, regr_syy, regr_sxx and regr_sxy.
fix #22110
Release Notes