Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support the JSON function JSON_STORAGE_SIZE #14488

Closed
qw4990 opened this issue Jan 16, 2020 · 4 comments · Fixed by #15248
Closed

Support the JSON function JSON_STORAGE_SIZE #14488

qw4990 opened this issue Jan 16, 2020 · 4 comments · Fixed by #15248
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. type/enhancement The issue or PR belongs to an enhancement.

Comments

@qw4990
Copy link
Contributor

qw4990 commented Jan 16, 2020

Feature Request

Is your feature request related to a problem? Please describe:

Support the JSON function JSON_STORAGE_SIZE.
In MySQL:

mysql> CREATE TABLE jtable (jcol JSON);
Query OK, 0 rows affected (0.01 sec)

mysql> INSERT INTO jtable VALUES  ('{"a": 1000, "b": "wxyz", "c": "[1, 3, 5, 7]"}');
Query OK, 1 row affected (0.00 sec)

mysql> select jcol, JSON_STORAGE_SIZE(jcol) as size from jtable;
+-----------------------------------------------+------+
| jcol                                          | size |
+-----------------------------------------------+------+
| {"a": 1000, "b": "wxyz", "c": "[1, 3, 5, 7]"} |   47 |
+-----------------------------------------------+------+

In TiDB:

mysql> CREATE TABLE jtable (jcol JSON);
Query OK, 0 rows affected (0.01 sec)

mysql> INSERT INTO jtable VALUES  ('{"a": 1000, "b": "wxyz", "c": "[1, 3, 5, 7]"}');
Query OK, 1 row affected (0.00 sec)

mysql> select jcol, JSON_STORAGE_SIZE(jcol) as size from jtable;
ERROR 1305 (42000): FUNCTION JSON_STORAGE_SIZE does not exist
@qw4990 qw4990 added type/enhancement The issue or PR belongs to an enhancement. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. labels Jan 16, 2020
@francis0407
Copy link
Member

francis0407 commented Jan 19, 2020

What are the first three characters of the issue title? In my Chrome, the title is
image
. Is it expected?
`

@qw4990 qw4990 changed the title Support the JSON function JSON_STORAGE_SIZE Support the JSON function JSON_STORAGE_SIZE Jan 19, 2020
@qw4990
Copy link
Contributor Author

qw4990 commented Jan 19, 2020

What are the first three characters of the issue title? In my Chrome, the title is
image
. Is it expected?
`

Is it ok now? In my Chrome it is nothing before Support....

@francis0407
Copy link
Member

It's OK now.

@stoksc
Copy link
Contributor

stoksc commented Mar 7, 2020

Is anyone working on this? I could take a shot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants