22.2.2

```sql
create table source (a UInt64, b UInt64, c String) Engine= Memory;

insert into source select number, number, 'attr-'||toString(number) from numbers(10);

CREATE DICTIONARY dict1
( a UInt64 , b UInt64  HIERARCHICAL, c String
) PRIMARY KEY a
SOURCE(clickhouse(DB 'default' TABLE 'source'))
LIFETIME(300) LAYOUT(flat());

SELECT dictGetDescendants('dict1', toUInt64(2), 0)
DB::Exception: Illegal type of third argument of function dictGetDescendants
Expected const unsigned integer.: While processing dictGetDescendants('dict1', toUInt64(2), 0). (ILLEGAL_TYPE_OF_ARGUMENT)

-- but !

SELECT dictGetDescendants('dict1', materialize(toUInt64(2)), 0)
┌─dictGetDescendants('dict1', materialize(toUInt64(2)), 0)─┐
│ [2]                                                      │
└──────────────────────────────────────────────────────────┘

SELECT dictGetDescendants('dict1', number, 0)
FROM numbers(3)
┌─dictGetDescendants('dict1', number, 0)─┐
│ [0]                                    │
│ [1]                                    │
│ [2]                                    │
└────────────────────────────────────────┘
```

> "DB::Exception: Illegal type of third argument of function dictGetDescendants"

Also the message is incorrect, the problem is in the second argument,  not the third argument 
key_columns = {std::move(key_column)};
                    key_types = {std::move(key_column_type)};
                }
            }
        }
        dictionary->convertKeyColumns(key_columns, key_types);
        if (dictionary_special_key_type == DictionarySpecialKeyType::Range)
        {
            key_columns.emplace_back(range_col);
            key_types.emplace_back(range_col_type);
        }
        DataTypePtr attribute_type = result_type;
        if (key_is_nullable)
        {
            DataTypes attribute_types;
            attribute_types.reserve(attribute_names.size());
            for (auto & attribute_name : attribute_names)
            {
                const auto & attribute = dictionary->getStructure().getAttribute(attribute_name);
                attribute_types.emplace_back(attribute.type);
            }
            attribute_type = attribute_types.front();
        }
        auto result_column = executeDictionaryRequest(dictionary, attribute_names, key_columns, key_types, attribute_type, default_cols);
        if (key_is_nullable)
            result_column = wrapInNullable(result_column, {arguments[2]}, result_type, input_rows_count);
        return result_column;
    }
private:
    ColumnPtr executeDictionaryRequest(