**How to check**
```
CREATE TABLE test_local on cluster '{cluster}' (number UInt64) ENGINE = MergeTree() ORDER BY number;
CREATE TABLE test_distruted (number UInt64) ENGINE = Distributed('{cluster}', currentDatabase(), test_local);

INSERT INTO test_local SELECT number from system.numbers limit 3;

select number from test_distruted order by toDateTime(number) DESC;
```

Without distributed table (only merge tree) it work's correctly

**Versions**
21.12.4 - ok
22.2.3 - ok
22.3.2 - not ok
SelectQueryOptions subquery() const
    {
        SelectQueryOptions out = *this;
        out.to_stage = QueryProcessingStage::Complete;
        ++out.subquery_depth;
        out.is_subquery = true;
        return out;
    }
    SelectQueryOptions & analyze(bool dry_run = true)
    {
        only_analyze = dry_run;
        return *this;
    }
    SelectQueryOptions & modify(bool value = true)
    {
        modify_inplace = value;
        return *this;
    }
    SelectQueryOptions & noModify() { return modify(false); }
    SelectQueryOptions & removeDuplicates(bool value = true)
    {
        remove_duplicates = value;
        return *this;
    }
    SelectQueryOptions & reorderColumns(bool value = true)