The only way to use this feature is to specify an empty database name in Distributed table definition, but then you get a warning:

```
CREATE TABLE `demo_loan_all` (...) ENGINE=Distributed(test_cluster_two_shards_different_databases, '', demo_loan_01568, cityHash64(id));

<Warning> StorageDistributed (demo_loan_all): Name of remote database is empty. Default database will be used implicitly.
```
ClusterPtr cluster,
    const ASTPtr & query_ptr,
    const StorageMetadataPtr & metadata_snapshot,
    ContextPtr local_context) const
{
    const auto & select = query_ptr->as<ASTSelectQuery &>();
    if (!select.prewhere() && !select.where())
    {
        return nullptr;
    }
    ASTPtr condition_ast;
    if (select.prewhere() && select.where())
    {
        condition_ast = makeASTFunction("and", select.prewhere()->clone(), select.where()->clone());
    }
    else
    {
        condition_ast = select.prewhere() ? select.prewhere()->clone() : select.where()->clone();
    }
    replaceConstantExpressions(condition_ast, local_context, metadata_snapshot->getColumns().getAll(), shared_from_this(), metadata_snapshot);
    size_t limit = local_context->getSettingsRef().optimize_skip_unused_shards_limit;
    if (!limit || limit > SSIZE_MAX)
    {