shahriyar-novruzov commented on PR #1378: URL: https://github.com/apache/arrow-java/pull/1378#issuecomment-6851833231
Fixed the float precision point from the last review. `toLocal()` does hand back a `Float` for `Rep.FLOAT`, so the branch was reachable. Widening it to a double first exposes the gap between the two binary formats: `1.0005f` arrives as `1.000499963760376` and rounds to `1.000` at scale 3, not the `1.001` the client sent. The coercer now reads a float through `Float.toString()`, which gives the shortest decimal that round-trips at float width, and keeps `BigDecimal.valueOf` for doubles. `testBindFloatKeepsTheDigitsTheClientSent` covers it. The existing `2.5f` case can't, since 2.5 is exact in binary. Also rebased on main, ran `mvn spotless:apply` for the formatting failure, and changed the issue line to `Closes #1377.` so the linked-issue check sees it. -- 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]
