Commits


Sagnik Chakraborty authored and Praveen committed 8bbfdc42f52
ARROW-10234: [C++][Gandiva] Fix logic of round() for floats/decimals in Gandiva This patch attempts to resolve the bug introduced by the addition of round() in ARROW-9641 round() for floats is returning incorrect results for some edge cases, like round(cast(1.55 as float), 1) gives 1.6, but it should be 1.5, since the result after casting 1.55 to float comes to 1.5499999523162842, due to inaccurate representation of floating point numbers in memory. Removing an intermediate explicit cast to float statement for a double value, which is used in subsequent computations, minimises the error introduced due to the incorrect representation. Closes #8398 from sagnikc-dremio/round-double and squashes the following commits: b1ef5438a <Sagnik Chakraborty> ARROW-10234: Fix logic of round() for floats/decimals in Gandiva Authored-by: Sagnik Chakraborty <sagnikc@dremio.com> Signed-off-by: Praveen <praveen@dremio.com>