dolt icon indicating copy to clipboard operation
dolt copied to clipboard

Casting to JSON fails for some values.

Open nicktobey opened this issue 8 months ago • 0 comments

MySQL:

mysql> select CAST(CURRENT_DATE as JSON);
+----------------------------+
| CAST(CURRENT_DATE as JSON) |
+----------------------------+
| "2023-12-20"               |
+----------------------------+
1 row in set (0.00 sec)

Dolt:

json> select CAST(CURRENT_DATE as JSON);
expression 'convert(current_date(), json)': couldn't convert to json: Invalid JSON text: invalid character '-' after top-level value

The expected result, although displayed as a string, is actually a Datetime object wrapped in a JSON document.

nicktobey avatar Dec 21 '23 08:12 nicktobey