[MCOL-599] JSON Functions Created: 2017-02-28 Updated: 2017-06-23 Resolved: 2017-06-23 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | ExeMgr |
| Affects Version/s: | 1.1.0 |
| Fix Version/s: | 1.1.0 |
| Type: | New Feature | Priority: | Major |
| Reporter: | David Hall (Inactive) | Assignee: | Daniel Lee (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | 10.2 | ||
| Issue Links: |
|
||||||||||||||||||||
| Sprint: | 2017-12, 2017-13 | ||||||||||||||||||||
| Description |
|
MariaDB 10.2 has added JSON Functions to its arsenal. Columnstore should also support these functions. Distributed JSON functions would be preferred, but perhaps a way could be found to shorten the cycle and not distribute them (Just a guess). |
| Comments |
| Comment by David Thompson (Inactive) [ 2017-06-12 ] |
|
These won't work as distributed functions since there is no implementation yet, but can you verify if these will work in the select list and also with text/blob? |
| Comment by Daniel Lee (Inactive) [ 2017-06-21 ] |
|
Build tested: Github source 1.1.0-1 [root@localhost mariadb-columnstore-server]# git show [root@localhost mariadb-columnstore-engine]# git show 1) According to the MariaDB's JSON KB articles, there are 26 JSON functions. Syntax wise, they all worked in ColumnStore. 2) Nine (9) of the functions returned the "Row size too large" error when it is applied to a TEXT column. 3) One (1) function, JSON_REPLACE() failed complaining about a missing JSON_UPDATE() function. This error occurred when the JSON_REPLACE is applied on ColumnStore columns (used varchar and text for testing). JSON_UPDATE is not one of the supported function and I could not find information about it. Maybe we need to inherit that function to ColumnStore since the same error did not occur in MariaDB. 4) I have created a test suite for JSON functions in Autopilot for automatic testing. Function with non-zero diff count failed to match results from MariaDB: 0 Passed JSON_ARRAY_APPEND.sql.diff.log Error message returned for failed functions: MariaDB [mytest]> SELECT cVarchar, JSON_COMPACT(cVarchar), JSON_COMPACT(cText) from jsontest; MariaDB [mytest]> SELECT cVarchar, JSON_DETAILED(cVarchar), cText, JSON_DETAILED(cText) from jsontest; MariaDB [mytest]> SELECT cVarchar, JSON_EXTRACT(cVarchar, '$[1]'), cText, JSON_EXTRACT(cText, '$[1]') from jsontest; MariaDB [mytest]> SELECT cVarchar, JSON_KEYS(cVarchar, '$.C'), cText, JSON_KEYS(cText, '$.C') from jsontest; MariaDB [mytest]> SELECT cVarchar, JSON_LOOSE(cVarchar), cText, JSON_LOOSE(cText) from jsontest; MariaDB [mytest]> SELECT cVarchar, JSON_QUERY(cVarchar, '$.key1'), cText, JSON_QUERY(cText, '$.key1') from jsontest; MariaDB [mytest]> SELECT cVarchar, JSON_REMOVE(cVarchar, '$.C'), cText, JSON_REMOVE(cText, '$.C') from jsontest; MariaDB [mytest]> SELECT cVarchar, JSON_UNQUOTE(cVarchar), cText, JSON_UNQUOTE(cText) from jsontest; MariaDB [mytest]> SELECT cVarchar, JSON_VALUE(cVarchar, '$.key1'), cText, JSON_VALUE(cText, '$.key1') from jsontest; MariaDB [mytest]> SELECT cVarchar, JSON_REPLACE(cVarchar, '$.B[1]', 4), cText, JSON_REPLACE(cText, '$.B[1]', 4) from jsontest; |
| Comment by David Thompson (Inactive) [ 2017-06-21 ] |
|
|
| Comment by David Thompson (Inactive) [ 2017-06-21 ] |
|
we should look into the missing json_update function, could be a merge issue. |
| Comment by Daniel Lee (Inactive) [ 2017-06-23 ] |
|
Completed investigation for this ticket. Two tickets have been created and linked. |