Open jackylee-ch opened 1 year ago
Describe the bug round(0.0157345, 6) return 0.015734
may due to the float type precision issue
Spark round float/double by converting to BigDecimal, maybe we can copy the convert logic of double and decimal in java.
https://github.com/apache/spark/blob/a056f694386cc074219914debf7023f5935bc37d/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/mathExpressions.scala#L1564
Describe the bug round(0.0157345, 6) return 0.015734