-
Notifications
You must be signed in to change notification settings - Fork 65
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
[BUG] getJsonObject gets infinity instead of zero for a very small float number #1923
Comments
For number normalization, first use
It seems that I tested that in jni's string to double kernel, this case will return null. maybe investigating on how jackson handles this issue can be helpful. |
Can you please file an issue in CUDF about this? If they are getting it wrong I think they would like to know about it. Also we need to file an issue in this repo as cast with this number is also doing the wrong thing.
on CPU we get back Our cast uses
|
Haoyang filed one follow-up issue in cuDF repo: rapidsai/cudf#15508 |
Filed rapidsai/cudf#15508 in cuDF. I use cuDF’s implementation because our string to double does not have a single kernel to call easily, It needs some refactoring to be used for getJsonObject or other usage. And it is not a bit to bit match to Spark also, although it should be much closer than one in cuDF, we might want to fix it in a long term. |
Then please file an issue to do so. |
Filed an issue to track |
Haoyang filed #1960 to track. |
Close this issue as PR #1944 merged. |
Describe the bug
CPU gets zero for number: 9.299999257686047e-0005603333574677677
But GPU gets infinity.
The number is a very small value nearly zero, so zero is the correct answer.
Steps/Code to reproduce bug
get_json_object("9.299999257686047e-0005603333574677677", "$")
CPU: 0.0
GPU: infinity
Additional context
JNI uses cuDF
string to double
anddouble to string
.cuDF can not hanlde very small float value, need to discuss how to fix:
The text was updated successfully, but these errors were encountered: