[MDEV-19160] JSON_DETAILED output unnecessarily verbose (Part Time project) Created: 2019-04-03 Updated: 2023-03-07 Resolved: 2023-01-06 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | JSON |
| Affects Version/s: | 10.4 |
| Fix Version/s: | 10.4.28, 10.5.19, 10.6.12 |
| Type: | Bug | Priority: | Major |
| Reporter: | Sergei Petrunia | Assignee: | Rucha Deodhar |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | beginner-friendly, gsoc21, gsoc22, optimizer | ||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| Description |
|
JSON_DETAILED function (https://mariadb.com/kb/en/library/json_detailed/ ) is described as
We now got a use case for it: Optimizer Trace output. Optimizer trace is too large to be copied in full, instead we use expressions like
Our experience is that JSON_DETAILED has some room for improvement when it comes to the quality of automatic JSON formatting. Example:
Things to note:
One can look at the JSON pretty-printer that is used by EXPLAIN FORMAT=JSON and optimizer trace. It produces a better result (but it has room for improvement, too.) Extra: in MySQL, the function is called JSON_PRETTY. We should add ability to use this name as an alias. |
| Comments |
| Comment by Sergei Petrunia [ 2019-04-03 ] |
|
cc: holyfoot |
| Comment by Nimit Savant [ 2021-03-14 ] |
|
Hey @varun, I want to contribute to this issue. Thank You! |
| Comment by Nimit Savant [ 2021-03-29 ] |
|
@Sergei Petrunia can you help me with this issue, and give me some more information about this issue. Thank You! |
| Comment by Robert Bindar [ 2021-03-29 ] |
|
Hey Nimit2801! You can start from Create_func_json_detailed class from item_create.cc and Item_func_json_format class from item_jsonfunc.cc psergey If there is anything you want to add or if you want Nimit2801 to tackle the proposed improvements in a particular order, feel free to step in. |
| Comment by Nimit Savant [ 2021-04-02 ] |
|
Hey @robertbindar, thanks for answering the question. |
| Comment by Robert Bindar [ 2021-04-05 ] |
|
Hey Nimit2801! Let me know if you have more questions. Also I encourage you to ask this type of questions in Zulip because there you have more visibility, this means faster and better answers most probably |
| Comment by Kai [ 2022-01-29 ] |
|
Hi, is there anyone working on this? If not, I would like to improve it. |
| Comment by Sergei Golubchik [ 2022-01-31 ] |
|
No, nobody is, please, feel free to do it |
| Comment by Nayuta Yanagisawa (Inactive) [ 2022-06-25 ] |
| Comment by Rucha Deodhar [ 2023-01-06 ] |
|
Patch (submitted as contribution): https://github.com/MariaDB/server/commit/111a752b968561b34a88f33052519cb989a8a90f |