-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Make sqllogictest distinguish NaN from -NaN #7403
Conversation
pyarrow error looks unrelated. Maybe re-trigger it later. |
query RRR | ||
SELECT nanvl(asin(10), 1.0), nanvl(1.0, 2.0), nanvl(asin(10), asin(10)) | ||
query RRB | ||
SELECT nanvl(asin(10), 1.0), nanvl(1.0, 2.0), isnan(nanvl(asin(10), asin(10))) |
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.
The sign of NaN
returned by asin(10)
seems different between operating systems.
On Linux, NaN
is returned but -NaN
on macOS and WIndows.
https://github.com/apache/arrow-datafusion/actions/runs/5971983397/job/16201846083#step:5:5969
https://github.com/apache/arrow-datafusion/actions/runs/5971983397/job/16201846201#step:5:6058
So, I use isnan
just to check if it's NaN
or not.
I believe CI will pass after merging up from |
I merged up from main to get the CI test fix |
@alamb We have encountered a problem related to this PR. The sign bit of the value representing NaN is platform-dependent. (As seen in this issue, I think the result of scalar functions on ARM is always NaN, not -NaN.). Can you suggest a way to solve this issue in a deterministic way? |
Hi @berkaysynnada |
This reverts commit fd7e612.
@berkaysynnada I opened #7462 for the issue you hit. |
Which issue does this PR close?
Closes #7402
Rationale for this change
DataFusion distinguishes
NaN
and-NaN
so sqllogictest should distinguish them for precise test.What changes are included in this PR?
Changed
conversion.rs
so that it returns"-NaN"
if a value is a kind ofNaN
and its sign is negative.Are these changes tested?
Modified existing test and added a simple test to
select.rs
.Are there any user-facing changes?
No.