
**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)

{
    FirstNonDeterministicFunctionMatcher::Data finder_data{context, std::nullopt};
    switch (command.type)
    {
        case MutationCommand::UPDATE:
        {
            auto update_assignments_ast = command.ast->as<const ASTAlterCommand &>().update_assignments->clone();
            FirstNonDeterministicFunctionFinder(finder_data).visit(update_assignments_ast);
            if (finder_data.nondeterministic_function_name)
                return finder_data.nondeterministic_function_name;
            
            [[fallthrough]];
        }
        case MutationCommand::DELETE:
        {
            auto predicate_ast = command.predicate->clone();
            FirstNonDeterministicFunctionFinder(finder_data).visit(predicate_ast);
            return finder_data.nondeterministic_function_name;
        }
        default:
            break;
    }
    return {};
}
ASTPtr prepareQueryAffectedAST(const std::vector<MutationCommand> & commands, const StoragePtr & storage, const Context & context)