**How to reproduce**
```
$ build_debug/programs/clickhouse local --query "SELECT DISTINCT NULL, if(number > 0, 't', '') AS res FROM numbers(1) ORDER BY res"
clickhouse: /home/milovidov/work/ClickHouse/src/Common/HashTable/HashTableKeyHolder.h:92: void keyHolderPersistKey(DB::ArenaKeyHolder &): Assertion `holder.key.size > 0' failed.
```

https://s3.amazonaws.com/clickhouse-test-reports/44824/6e946cc75779980b65804c70898beaee3d2e621e/fuzzer_astfuzzerdebug/report.html

See https://aretestsgreenyet.com/
#pragma once
#include <type_traits>
#include <Common/HashTable/HashSet.h>
/** A hash table that allows you to clear the table in O(1).
  * Even simpler than HashSet: Key and Mapped must be POD-types.
  *
  * Instead of this class, you could just use the pair (version, key) in the HashSet as the key
  * but then the table would accumulate all the keys that it ever stored, and it was unreasonably growing.
  * This class goes a step further and considers the keys with the old version empty in the hash table.
  */
struct ClearableHashSetState
{
    UInt32 version = 1;
    
    void write(DB::WriteBuffer & wb) const         { DB::writeBinary(version, wb); }
    void writeText(DB::WriteBuffer & wb) const     { DB::writeText(version, wb); }
    
    void read(DB::ReadBuffer & rb)                 { DB::readBinary(version, rb); }
    void readText(DB::ReadBuffer & rb)             { DB::readText(version, rb); }
};
template <typename Key, typename BaseCell>
struct ClearableHashTableCell : public BaseCell
{
    using State = ClearableHashSetState;
    using value_type = typename BaseCell::value_type;
    UInt32 version;
    bool isZero(const State & state) const { return version != state.version; }
    static bool isZero(const Key & , const State & ) { return false; }