```sql
create table dat (blockNum Decimal(10,0), eventTimestamp DateTime64(9) ) 
Engine=MergeTree() primary key eventTimestamp;
insert into dat values (1, '2022-01-24 02:30:00.008122000');

CREATE DICTIONARY datDictionary
(
    `blockNum` Decimal(10, 0),
    `eventTimestamp` DateTime64(9)
)
PRIMARY KEY blockNum
SOURCE(CLICKHOUSE(TABLE 'dat'))
LIFETIME(MIN 0 MAX 1000)
LAYOUT(FLAT());

select * from datDictionary;
┌─blockNum─┬────────────────eventTimestamp─┐
│        1 │ 2022-01-24 02:30:00.008122000 │
└──────────┴───────────────────────────────┘

select count(*) from dat where eventTimestamp >= (select eventTimestamp from datDictionary);

Exception on client:
Code: 32. DB::Exception: Attempt to read after eof: while receiving packet from localhost:9000. (ATTEMPT_TO_READ_AFTER_EOF)

Connecting to localhost:9000 as user default.
Code: 210. DB::NetException: Connection refused (localhost:9000). (NETWORK_ERROR)
```

```sql
drop dictionary datDictionary;

CREATE DICTIONARY datDictionary
(
    `blockNum` Decimal(10, 0),
    `eventTimestamp` DateTime64(9)
)
PRIMARY KEY blockNum
SOURCE(CLICKHOUSE(TABLE 'dat'))
LIFETIME(MIN 0 MAX 1000)
LAYOUT(complex_key_hashed());

select count(*) from dat where eventTimestamp >= (select eventTimestamp from datDictionary);

Error on processing query: Code: 32. DB::Exception: Attempt to read after eof: while receiving packet from localhost:9000. (ATTEMPT_TO_READ_AFTER_EOF) (version 22.7.1.1054)

Connecting to localhost:9000 as user default.
Code: 210. DB::NetException: Connection refused (localhost:9000). (NETWORK_ERROR)
```

```sql
select * from datDictionary;
┌─blockNum─┬────────────────eventTimestamp─┐
│        1 │ 2022-01-24 02:30:00.008122000 │
└──────────┴───────────────────────────────┘

select dictGet('datDictionary', 'eventTimestamp', tuple(cast('1','Decimal(10,0)')));
Code: 407. DB::Exception: Received from localhost:9000. DB::Exception: Bad scale of decimal field. (DECIMAL_OVERFLOW)
```

else if (type == TypeIndex::Int64)
            maximize(max_bits_of_signed_integer, 64);
        else if (type == TypeIndex::Int128)
            maximize(max_bits_of_signed_integer, 128);
        else if (type == TypeIndex::Int256)
            maximize(max_bits_of_signed_integer, 256);
        else if (type == TypeIndex::Float32)
            maximize(max_mantissa_bits_of_floating, 24);
        else if (type == TypeIndex::Float64)
            maximize(max_mantissa_bits_of_floating, 53);
        else if (type != TypeIndex::Nothing)
            all_numbers = false;
    }
    if (max_bits_of_signed_integer || max_bits_of_unsigned_integer || max_mantissa_bits_of_floating)
    {
        if (!all_numbers)
            return throwOrReturn<on_error>(types, "because some of them are numbers and some of them are not", ErrorCodes::NO_COMMON_TYPE);
        
        
        size_t min_bit_width_of_integer = std::max(max_bits_of_signed_integer, max_bits_of_unsigned_integer);
        
        if (max_bits_of_signed_integer && max_bits_of_unsigned_integer >= max_bits_of_signed_integer) 
        {
            
            
            if (min_bit_width_of_integer != 64)
                ++min_bit_width_of_integer;
            else
                return throwOrReturn<on_error>(types,
                    "because some of them are signed integers and some are unsigned integers,"