pingcap/tidb

Change EXPLAIN operatorInfo to use ; separator

Open

#20,520 opened on Oct 19, 2020

View on GitHub
 (1 comment) (0 reactions) (1 assignee)Go (40,090 stars) (6,186 forks)batch import
good first issuesig/plannertype/enhancement

Description

Development Task

This is a fork from the discussion in https://github.com/pingcap/tidb/pull/20482

Currently the operatorInfo is separated by ,, but since this character is commonly used in range(a,b), it would make it easier for automated programs to split based on a semicolon ;. i.e.

+------------------------------+----------+-----------+---------------+---------------------------------------------------+
| id                           | estRows  | task      | access object | operator info                                     |
+------------------------------+----------+-----------+---------------+---------------------------------------------------+
| HashJoin_17                  | 12487.50 | root      |               | inner join; equal:[eq(test.t2.t1_id, test.t1.id)] |
| ├─TableReader_20(Build)      | 9990.00  | root      |               | data:Selection_19                                 |
| │ └─Selection_19             | 9990.00  | cop[tikv] |               | not(isnull(test.t2.t1_id))                        |
| │   └─TableFullScan_18       | 10000.00 | cop[tikv] | table:t2      | keep order:false; stats:pseudo                    |
| └─TableReader_22(Probe)      | 10000.00 | root      |               | data:TableFullScan_21                             |
|   └─TableFullScan_21         | 10000.00 | cop[tikv] | table:t1      | keep order:false; stats:pseudo                    |
+------------------------------+----------+-----------+---------------+---------------------------------------------------+
6 rows in set (0.00 sec)```

Contributor guide

Change EXPLAIN operatorInfo to use ; separator · pingcap/tidb#20520 | Good First Issue