You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "sohardforaname (via GitHub)" <gi...@apache.org> on 2023/01/29 06:51:33 UTC
[GitHub] [doris] sohardforaname opened a new pull request, #16192: [Fix](regression-test)fix regression test framework cannot compare double value nan and inf.
sohardforaname opened a new pull request, #16192:
URL: https://github.com/apache/doris/pull/16192
# Proposed changes
Issue Number: close #xxx
## Problem summary
fix regression test framework cannot compare double value nan and inf.
check this fix by 'select acos(kdbl) from fn_test order by kdbl'
when kdbl is 1.1 and 1.2, acos(kdbl) = nan.
## Checklist(Required)
1. Does it affect the original behavior:
- [ ] Yes
- [x] No
- [ ] I don't know
2. Has unit tests been added:
- [ ] Yes
- [ ] No
- [x] No Need
3. Has document been added or modified:
- [ ] Yes
- [ ] No
- [x] No Need
4. Does it need to update dependencies:
- [ ] Yes
- [x] No
5. Are there any changes that cannot be rolled back:
- [ ] Yes (If Yes, please explain WHY)
- [x] No
## Further comments
If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] sohardforaname closed pull request #16192: [Fix](regression-test)fix regression test framework cannot compare double value nan and inf.
Posted by "sohardforaname (via GitHub)" <gi...@apache.org>.
sohardforaname closed pull request #16192: [Fix](regression-test)fix regression test framework cannot compare double value nan and inf.
URL: https://github.com/apache/doris/pull/16192
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #16192: [Fix](regression-test)fix regression test framework cannot compare double value nan and inf.
Posted by github-actions.
github-actions[bot] commented on PR #16192:
URL: https://github.com/apache/doris/pull/16192#issuecomment-1407606712
PR approved by at least one committer and no changes requested.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] jackwener commented on a diff in pull request #16192: [Fix](regression-test)fix regression test framework cannot compare double value nan and inf.
Posted by "jackwener (via GitHub)" <gi...@apache.org>.
jackwener commented on code in PR #16192:
URL: https://github.com/apache/doris/pull/16192#discussion_r1089896553
##########
regression-test/framework/src/main/groovy/org/apache/doris/regression/util/OutputUtils.groovy:
##########
@@ -62,6 +62,10 @@ class OutputUtils {
if (expectNull != actualNull) {
return "${info}, line ${line}, ${dataType} result mismatch.\nExpect cell: ${expectCell}\nBut real is: ${realCell}"
+ } else if (expectCell.contains("nan") || expectCell.contains("inf")) {
+ return expectCell == realCell
+ ? null
+ : "${info}, line ${line}, ${dataType} result mismatch.\nExpect cell: ${expectCell}\nBut real is: ${realCell}"
Review Comment:
```suggestion
Boolean actualNaN = realCell.equals("nan")
Boolean expectInf = expectCell.equals("inf")
Boolean actualInf = realCell.equals("inf")
if (expectNull != actualNull || expectNaN != actualNaN || expectInf != actualInf) {
return "${info}, line ${line}, ${dataType} result mismatch.\nExpect cell: ${expectCell}\nBut real is: ${realCell}"
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] sohardforaname commented on a diff in pull request #16192: [Fix](regression-test)fix regression test framework cannot compare double value nan and inf.
Posted by "sohardforaname (via GitHub)" <gi...@apache.org>.
sohardforaname commented on code in PR #16192:
URL: https://github.com/apache/doris/pull/16192#discussion_r1089896915
##########
regression-test/framework/src/main/groovy/org/apache/doris/regression/util/OutputUtils.groovy:
##########
@@ -62,6 +62,10 @@ class OutputUtils {
if (expectNull != actualNull) {
return "${info}, line ${line}, ${dataType} result mismatch.\nExpect cell: ${expectCell}\nBut real is: ${realCell}"
+ } else if (expectCell.contains("nan") || expectCell.contains("inf")) {
+ return expectCell == realCell
+ ? null
+ : "${info}, line ${line}, ${dataType} result mismatch.\nExpect cell: ${expectCell}\nBut real is: ${realCell}"
Review Comment:
no, we should also consider -inf
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #16192: [Fix](regression-test)fix regression test framework cannot compare double value nan and inf.
Posted by github-actions.
github-actions[bot] commented on PR #16192:
URL: https://github.com/apache/doris/pull/16192#issuecomment-1407606724
PR approved by anyone and no changes requested.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org