The encoding was introduced in this commit. The information how decimals are encoded in the binary protocol is important for connectors developers.
Cited from the commit message:
The decimal MsgPack representation looks like this:
+--------+-------------------+------------+===============+
| MP_EXT | length (optional) | MP_DECIMAL | PackedDecimal |
+--------+-------------------+------------+===============+
MsgPack spec defines fixext 1/2/4/8/16 and ext 8/16/32 types. fixext types have fixed length, so it is not encoded explicitly, while ext types require to encode a data length. MP_EXP + optional length meant usage of one of those types.
MP_DECIMAL is 1.
I don't know how exactly PackedDecimal is encoded. @sergepetrenko, can you share more info?
The encoding was introduced in this commit. The information how decimals are encoded in the binary protocol is important for connectors developers.
Cited from the commit message:
MsgPack spec defines
fixext 1/2/4/8/16andext 8/16/32types.fixexttypes have fixed length, so it is not encoded explicitly, whileexttypes require to encode a data length. MP_EXP + optional length meant usage of one of those types.MP_DECIMAL is 1.
I don't know how exactly PackedDecimal is encoded. @sergepetrenko, can you share more info?