Open guo-shaoge opened 3 years ago
@xiongjiwei tells it's expected to implicitly cast the string to json opaque. However, the implementation of TiDB is still different:
mysql> SELECT JSON_UNQUOTE(CAST(CAST('ABCD' AS BINARY) AS JSON));
+----------------------------------------------------+
| JSON_UNQUOTE(CAST(CAST('ABCD' AS BINARY) AS JSON)) |
+----------------------------------------------------+
| base64:type253:QUJDRA== |
+----------------------------------------------------+
1 row in set (0.00 sec)
mysql> SELECT JSON_UNQUOTE(CAST('ABCD' AS BINARY));
+--------------------------------------+
| JSON_UNQUOTE(CAST('ABCD' AS BINARY)) |
+--------------------------------------+
| ABCD |
+--------------------------------------+
1 row in set (0.00 sec)
It's actually not implicitly casted to json, but return the string directly. @xiongjiwei How do you think about it?
I will take a look and fix it
@xiongjiwei is this still something you're working on?
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
master