dolt
dolt copied to clipboard
Decimals in JSON columns are being improperly coerced into strings when inserted into tables.
Reproduction steps:
CREATE TABLE test(j json);
INSERT INTO test VALUES (JSON_OBJECT("a", 1.0));
SELECT * FROM test;
SELECT * FROM test WHERE j =JSON_OBJECT("a", 1.0);
MySQL output:
mysql> select * from test;
+------------+
| j |
+------------+
| {"a": 1.0} |
+------------+
mysql> SELECT * FROM test WHERE j =JSON_OBJECT("a", 1.0);
+------------+
| j |
+------------+
| {"a": 1.0} |
+------------+
Dolt output:
json> select * from test;
+------------+
| j |
+------------+
| {"a": "1"} |
+------------+
select * from test where j = JSON_OBJECT("a", 1.0);
Empty set (0.00 sec)