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.
```
if (select.distinct)
    {
        if (!sharding_block_has(select.select()->children))
            return {};
    }
    
    const ASTPtr group_by = select.groupBy();
    if (!group_by)
    {
        if (!select.distinct)
            return {};
    }
    else
    {
        if (!sharding_block_has(group_by->children, 1))
            return {};
    }
    
    const ASTPtr order_by = select.orderBy();
    if (order_by)
        return QueryProcessingStage::WithMergeableStateAfterAggregation;
    
    
    
    if (select.limitBy() || select.limitLength() || select.limitOffset())
        return QueryProcessingStage::WithMergeableStateAfterAggregation;
    
    return QueryProcessingStage::Complete;
}
size_t getClusterQueriedNodes(const Settings & settings, const ClusterPtr & cluster)