radondb / radon

RadonDB is an open source, cloud-native MySQL database for building global, scalable cloud services
https://radondb.io/
GNU General Public License v3.0
1.8k stars 217 forks source link

[bug] The result of explain has the problem of escaping characters #706

Closed zhyass closed 3 years ago

zhyass commented 3 years ago
mysql> explain select t3.a from t2 join t3 on t2.a+t3.a>1;
+----------------------------------------------------------------------------+
| EXPLAIN                                                                    |
+----------------------------------------------------------------------------+
| {
  "RawQuery": " select t3.a from t2 join t3 on t2.a+t3.a>1",
  "Project": "a",
  "Partitions": [
    {
      "Query": "select t2.a from test.t2",
      "Backend": "backend1",
      "Range": ""
    },
    {
      "Query": "select t3.a from test.t3_0000 as t3 where :t2_a + t3.a \u003e 1",
      "Backend": "backend1",
      "Range": "[0-512)"
    },
    ... ...
    {
      "Query": "select t3.a from test.t3_0007 as t3 where :t2_a + t3.a \u003e 1",
      "Backend": "backend2",
      "Range": "[3584-4096)"
    }
  ],
  "Join": {
    "Type": "INNER JOIN",
    "Strategy": "Nested Loop Join"
  }
} |
+----------------------------------------------------------------------------+
1 row in set (0.00 sec)

In https://pkg.go.dev/encoding/json#Marshal , the description This replacement can be disabled when using an Encoder, by calling SetEscapeHTML(false)..