amoeba commented on issue #413:
URL: https://github.com/apache/arrow-go/issues/413#issuecomment-3628832413

   Since I'm still running into this I looked closer. The issue comes down to 
the fact that `int(NaN)` is undefined behavior which is not a Go-specific thing.
   
   macOS-aarch64:
   
   ```console
   $ go run test.go
   math.MinInt64  -9223372036854775808
   math.Sqrt(math.MinInt64)  NaN
   int(math.Sqrt(math.MinInt64))  0
   ```
   
   Linux-amd64:
   
   ```console
   $ go run test.go
   math.MinInt64  -9223372036854775808
   math.Sqrt(math.MinInt64)  NaN
   int(math.Sqrt(math.MinInt64))  -9223372036854775808
   ```
   
   We could remove the assertion I guess but I just put up a PR to "fix" it: 
https://github.com/apache/arrow-go/pull/602. I'm not sure of the original 
intent of that line so let me know what you think.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to