**Describe what's wrong**

If a column named `ALL` or `DISTINCT` appears in the first position of the select list in a distributed query, the query fails with `Syntax error`.

In the rewriten query the column name appears without quotation marks, so remote server interprets `DISTINCT` as part of `SELECT DISTINCT` instead of column name. Same thing applies to column named `ALL`.

**Does it reproduce on recent release?**

Yes, It reproduces on 21.11.5 official build

**How to reproduce**

* Which ClickHouse server version to use
* Which interface to use, if matters
* Non-default settings, if any
```sql
SET prefer_localhost_replica=0
```
* `CREATE TABLE` statements for all tables involved
```sql
CREATE TABLE  t0 ("KEY" Int64, "ALL" Int64, "DISTINCT" Int64) ENGINE = MergeTree() ORDER BY KEY
CREATE TABLE dist_t0 ("KEY" Int64, "ALL" Int64, "DISTINCT" Int64) ENGINE = Distributed(test_shard_localhost, default, t0)
```
* Sample data for all these tables, use [clickhouse-obfuscator](https://github.com/ClickHouse/ClickHouse/blob/master/programs/obfuscator/Obfuscator.cpp#L42-L80) if necessary
* Queries to run that lead to unexpected result

```sql
:) select "DISTINCT" from dist_t0

SELECT DISTINCT
FROM dist_t0

Query id: d9024cf2-777e-4f5e-a7fa-f9d2eb8dc661


0 rows in set. Elapsed: 0.013 sec. 

Received exception from server (version 21.11.5):
Code: 62. DB::Exception: Received from localhost:9000. DB::Exception: Received from localhost:9000. DB::Exception: Syntax error: failed at position 22 ('default'): default.t0. Expected one of: UNION, LIMIT, WHERE, WINDOW, DoubleColon, LIKE, GLOBAL NOT IN, end of query, HAVING, AS, DIV, IS, UUID, GROUP BY, INTO OUTFILE, OR, EXCEPT, QuestionMark, OFFSET, BETWEEN, NOT LIKE, MOD, PREWHERE, AND, Comma, alias, ORDER BY, SETTINGS, IN, ILIKE, INTERSECT, FROM, FORMAT, Dot, NOT ILIKE, WITH, NOT, Arrow, token, NOT IN, GLOBAL IN. (SYNTAX_ERROR)
```

extern const Event DistributedDelayedInserts;
    extern const Event DistributedDelayedInsertsMilliseconds;
}
namespace DB
{
namespace ErrorCodes
{
    extern const int LOGICAL_ERROR;
    extern const int NOT_IMPLEMENTED;
    extern const int STORAGE_REQUIRES_PARAMETER;
    extern const int BAD_ARGUMENTS;
    extern const int NUMBER_OF_ARGUMENTS_DOESNT_MATCH;
    extern const int INCORRECT_NUMBER_OF_COLUMNS;
    extern const int INFINITE_LOOP;
    extern const int ILLEGAL_FINAL;
    extern const int TYPE_MISMATCH;
    extern const int TOO_MANY_ROWS;
    extern const int UNABLE_TO_SKIP_UNUSED_SHARDS;
    extern const int INVALID_SHARD_ID;
    extern const int ALTER_OF_COLUMN_IS_FORBIDDEN;
    extern const int DISTRIBUTED_TOO_MANY_PENDING_BYTES;
    extern const int ARGUMENT_OUT_OF_BOUND;
}
namespace ActionLocks
{
    extern const StorageActionBlockType DistributedSend;
}
namespace
{
ASTPtr rewriteSelectQuery(const ASTPtr & query, const std::string & database, const std::string & table, ASTPtr table_function_ptr = nullptr)