You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MySQL: Use a customized function to serialize float number
TiDB: Use a wrapper function around the standard libraries to format float
TiKV: Use ryu to serialize float.
They have different behaviors for the following situation:
The choice between scientific notation and normal notation is different (though I haven't constructed an example of the difference 🤦♂️ ). (For TiDB, it's quite simple: if it's ge than 1e21, or less than 1e-6, it's represented in scientific notation. For TiKV, it's more complicated, see https://github.com/dtolnay/ryu/blob/master/src/f2s.rs#L127).
The positive exponent part doesn't include "+" in TiKV and MySQL, but do include "+" in TiDB
The tailing .0 is added for integer in TiKV and MySQL, but not in TiDB.
For the 2 and 3, we could align the behavior of TiKV, MySQL and TiDB by adding some strategies in TiDB, but for the 1 problem, I haven't thought out a good idea.
Enhancement
Printing json
1.0
will get1
, which is not expected. It should print1.0
.The text was updated successfully, but these errors were encountered: