You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gluten.apache.org by "ccat3z (via GitHub)" <gi...@apache.org> on 2025/03/11 07:33:45 UTC
[I] [VL] Result mismatch in cast(float|double as string) [incubator-gluten]
ccat3z opened a new issue, #8959:
URL: https://github.com/apache/incubator-gluten/issues/8959
### Backend
VL (Velox)
### Bug description
Velox always produce fixed precision scientific notation when cast number litter equal `1E-3` or greater equal `1E7`. But vanilla spark produce shortest scientific notation.
```
cast(double as string)
5.957E-4 -> 5.9570000000000001E-4
1.0E-6 -> 9.9999999999999995E-7
7.639E-4 -> 7.6389999999999997E-4
```
https://github.com/facebookincubator/velox/pull/12574 may fix fixed-precision issue, but the results are still mismatch due to https://bugs.openjdk.org/browse/JDK-4511638. Double.toString in java < 19 may product incorrect and longer result, for example:
| Double | Double.toString JDK <= 18 | JDK 19, Other IEEE 754 C++ Implements | |
| -- | -- | -- | -- |
| 7.5371334E25 | 7.5371335E25 | 7.5371334E25 | # incorrect |
| _carrier uint64_ | _4994259165719689788_ | _4994259165603274466_ | |
| 1.0E23 | 9.999999999999999E22 | 1.0E23 | # longer |
| _carrier uint64_ | _4950912855330343670_ | _4950912855330343670_ | |
### Spark version
None
### Spark configurations
_No response_
### System information
_No response_
### Relevant logs
```bash
```
--
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@gluten.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org
Re: [I] [VL] Result mismatch in cast(float|double as string) [incubator-gluten]
Posted by "ccat3z (via GitHub)" <gi...@apache.org>.
ccat3z commented on issue #8959:
URL: https://github.com/apache/incubator-gluten/issues/8959#issuecomment-2720330715
> Does it mean if we upgrade JDK one day, we will get different result using vanilla spark as well?
That's right.
--
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@gluten.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org
Re: [I] [VL] Result mismatch in cast(float|double as string) [incubator-gluten]
Posted by "FelixYBW (via GitHub)" <gi...@apache.org>.
FelixYBW commented on issue #8959:
URL: https://github.com/apache/incubator-gluten/issues/8959#issuecomment-2719628371
Does it mean if we upgrade JDK one day, we will get different result using vanilla spark as well?
--
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@gluten.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org