nzw921rx commented on PR #12786:
URL: https://github.com/apache/seatunnel/pull/12786#issuecomment-6230865957
Non-blocking follow-up on the FLOAT precision point Daniel raised above,
after checking it locally:
- Current behaviour: a `0.1f` cell is written as `0.10000000149011612`
(`Float.doubleValue()` keeps the exact binary value of the float). Any value
that is not exactly representable (0.1, 1.1, 12.34, ...) shows the long tail in
Tablestore.
- A one-line change for the `Float` case
(`Double.parseDouble(value.toString())`) writes `0.1` as `0.1`; I verified it
locally with a `0.1f` test (the 5 existing serializer tests plus the new one
pass).
- `DECIMAL -> double` rounding is inherent to the Tablestore type mapping; a
short precision note in `docs/{en,zh}/connectors/sink/Tablestore.md` is enough
for that part.
Not a blocker for merging. If you prefer, the Float change plus the docs
note can be a follow-up instead. I can share the local patch if useful.
--
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]