
**Bug description**
Unlike `cluster()`, `clusterAllReplicas()` does not implement `_shard_num`. 

I would expect
```
SELECT _shard_num
FROM clusterAllReplicas(prod, system.one)
ORDER BY _shard_num ASC
FORMAT PrettyCompactMonoBlock

┌─_shard_num─┐
│          0 │
│          0 │
│          0 │
│          0 │
│          0 │
│          0 │
│          0 │
│          0 │
│          0 │
│          0 │
│          0 │
│          0 │
│          0 │
│          0 │
│          0 │
│          0 │
│          0 │
│          0 │
│          0 │
│          0 │
│          0 │
│          0 │
│          0 │
│          0 │
│          0 │
│          0 │
│          0 │
│          0 │
│          0 │
│          0 │
└────────────┘
```
to have an output more useful like
```
SELECT _shard_num
FROM cluster(prod, system.one)
ORDER BY _shard_num ASC
FORMAT PrettyCompactMonoBlock

┌─_shard_num─┐
│          1 │
│          2 │
│          3 │
│          4 │
│          5 │
│          6 │
│          7 │
│          8 │
│          9 │
│         10 │
│         11 │
│         12 │
│         13 │
│         14 │
│         15 │
└────────────┘
```

**Releases where this has been tested**

* v20.3.12.112-stable

**References**

[cluster, clusterAllReplicas documentation](https://clickhouse.tech/docs/en/sql-reference/table-functions/cluster/)

[_shard_num documentation](https://clickhouse.tech/docs/en/engines/table-engines/special/distributed/#virtual-columns)

type_literal);
                stages.back().column_to_updated.emplace(column, updated_column);
            }
            if (!affected_materialized.empty())
            {
                stages.emplace_back(context);
                for (const auto & column : columns_desc)
                {
                    if (column.default_desc.kind == ColumnDefaultKind::Materialized)
                    {
                        stages.back().column_to_updated.emplace(
                            column.name,
                            column.default_desc.expression->clone());
                    }
                }
            }
        }
        else if (command.type == MutationCommand::MATERIALIZE_INDEX)
        {
            auto it = std::find_if(
                    std::cbegin(indices_desc), std::end(indices_desc),
                    [&](const IndexDescription & index)
                    {
                        return index.name == command.index_name;
                    });
            if (it == std::cend(indices_desc))
                throw Exception("Unknown index: " + command.index_name, ErrorCodes::BAD_ARGUMENTS);
            auto query = (*it).expression_list_ast->clone();
            auto syntax_result = TreeRewriter(context).analyze(query, all_columns);
            const auto required_columns = syntax_result->requiredSourceColumns();