```
CREATE TABLE default.x AS system.numbers ENGINE = Log;

INSERT INTO FUNCTION cluster('test_cluster_two_shards', default, x) SELECT * FROM numbers(10)

Received exception from server (version 20.11.1):
Code: 55. DB::Exception: Received from localhost:9000. DB::Exception: Method write is not supported by storage Distributed with more than one shard and no sharding key provided. 

0 rows in set. Elapsed: 0.001 sec. 

INSERT INTO FUNCTION cluster('test_cluster_two_shards', default, x, rand()) SELECT * FROM numbers(10)

Received exception from server (version 20.11.1):
Code: 42. DB::Exception: Received from localhost:9000. DB::Exception: Table function 'cluster' requires from 2 to 3 parameters: <addresses pattern or cluster name>, <name of remote database>, <name of remote table>. 

0 rows in set. Elapsed: 0.001 sec. 
```
if (!lit)
            throw Exception(description + String(" must be string literal (in single quotes)."), ErrorCodes::BAD_ARGUMENTS);
        if (lit->value.getType() != Field::Types::String)
            throw Exception(description + String(" must be string literal (in single quotes)."), ErrorCodes::BAD_ARGUMENTS);
        return safeGet<const String &>(lit->value);
    };
    if (is_cluster_function)
    {
        args[arg_num] = evaluateConstantExpressionOrIdentifierAsLiteral(args[arg_num], context);
        cluster_name = args[arg_num]->as<ASTLiteral &>().value.safeGet<const String &>();
    }
    else
    {
        if (!tryGetIdentifierNameInto(args[arg_num], cluster_name))
            cluster_description = get_string_literal(*args[arg_num], "Hosts pattern");
    }
    ++arg_num;
    const auto * function = args[arg_num]->as<ASTFunction>();
    if (function && TableFunctionFactory::instance().isTableFunctionName(function->name))
    {
        remote_table_function_ptr = args[arg_num];
        ++arg_num;
    }
    else
    {
        args[arg_num] = evaluateConstantExpressionForDatabaseName(args[arg_num], context);
        remote_database = args[arg_num]->as<ASTLiteral &>().value.safeGet<String>();
        ++arg_num;
        size_t dot = remote_database.find('.');
        if (dot != String::npos)