**How to reproduce**

```
:) CREATE TABLE `test` (`data` Int64) ENGINE=MergeTree() ORDER BY(`data`);

CREATE TABLE test
(
    `data` Int64
)
ENGINE = MergeTree()
ORDER BY data

Ok.

0 rows in set. Elapsed: 0.007 sec. 
```

```
:) INSERT INTO `test` VALUES(100);

INSERT INTO test VALUES

Ok.

1 rows in set. Elapsed: 0.002 sec. 
```

```
:) SELECT * FROM `test`;

SELECT *
FROM test

┌─data─┐
│  100 │
└──────┘

1 rows in set. Elapsed: 0.002 sec. 
```

```
:) SELECT * FROM `test` FORMAT JSON;

SELECT *
FROM test
FORMAT JSON

{
	"meta":
	[
		{
			"name": "data",
			"type": "Int64"
		}
	],

	"data":
	[
		{
			"data": "100"

	],

	"rows": 1,

	"statistics":
	{
		"elapsed": 0.001765624,
		"rows_read": 1,
		"bytes_read": 8
	}
}

1 rows in set. Elapsed: 0.005 sec. 
```

---

**Which ClickHouse server version to use**

I am using the clickhouse-server docker image. Image ID: `3aa412f816ec`

```
# clickhouse-client
ClickHouse client version 20.6.3.28 (official build).
Connecting to localhost:9000 as user default.
Connected to ClickHouse server version 20.6.3 revision 54436.
```

---

**Expected behavior**

In the `FORMAT JSON` output, I expected the `data` field to be a valid JSON. But it is not. The closing curly bracket for the object is missing.

**Error message and/or stacktrace**

![Screenshot from 2020-08-10 20-18-21](https://user-images.githubusercontent.com/12874561/89796005-b8a16500-db46-11ea-840f-b98b4210d76b.png)

try
                {
                    std::stringstream dump_before_fuzz
                    fuzz_base->dumpTree(dump_before_fuzz)
                    auto base_before_fuzz = fuzz_base->formatForErrorMessage()
                    ast_to_process = fuzz_base->clone()
                    std::stringstream dump_of_cloned_ast
                    ast_to_process->dumpTree(dump_of_cloned_ast)
                    // Run the original query as ell.
                    
                    {
                        fuzzer.fuzzMain(ast_to_process)
                    
                    auto base_after_fuzz = fuzz_base->formatForErrorMessage()
                    // Debug AST cloning errors.
                     base_after_fuzz)
                    {
                        fprintf(stderr, "base before fuzz: %s\n"
                            "base after fuzz: %s\n", base_before_fuzz.c_str(),
                            base_after_fuzz.c_str())
                        fprintf(stderr, "dump before fuzz:\n%s\n",
                            dump_before_fuzz.str().c_str())
                        fprintf(stderr, "dump of cloned ast:\n%s\n",
                            dump_of_cloned_ast.str().c_str())
                        fprintf(stderr, "dump after fuzz:\n")
                        fuzz_base->dumpTree(std::cerr)
                        assert(false)
                    
                    auto fuzzed_text = ast_to_process->formatForErrorMessage()
                    if (fuzz_step > 0 && fuzzed_text == base_before_fuzz)