planner: support explain plan in JSON format
Open
sig/planner
type/enhancement
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Enhancement
JSON is a language-independent format for data exchange and easy to decode. With this format, optimizer plan can be easily decoded, as well as easy integration with 3rd party tools. It was supported in MySQL since 5.6. In order to improve scalability and compatibility, we need a JSON format output of explain result.
### Notice: this json format is not same with MySQL‘s, we use `format = tidb_json` distinguish
## TODO
- [ ] `executeInfo` and `operatorInfo` can be show as JSON format rather than string, but we need add JSON tag for each operator
- [ ] https://github.com/pingcap/tidb/pull/39253#issuecomment-1330188920
Contributor guide
Assessment
This issue has not been assessed yet.