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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
