Имеется Materialized база, данные реплицируюся нормально, в базе данные есть

Если выполнить запрос

```
SELECT 
    DISTINCT P.id, 
    P.name, 
    P.catalog_id
FROM products P 
WHERE 
    P.name ILIKE '%Легкие%'
```

То получим результат:

`   |name                                                                                                |catalog_id|brand_id|
---|----------------------------------------------------------------------------------------------------|----------|--------|
915|Подвеска "Легкие"                                                                                   |      5287|   15837|
990|Кроссовки/Кроссовки текстильные/Кроссовки женские летние/кроссовки легкие/Кроссовки спортивные      |      1053|   24390|
781|Брюки женские / Брюки прямые / Легкие брюки на резинке                                              |      1041|    1176|`

Но если в запрос добавить AND catalog_id = N

```
SELECT 
    DISTINCT P.id, 
    P.name, 
    P.catalog_id
FROM products P 
WHERE 
    P.name ILIKE '%Легкие%' AND P.catalog_id = 5287;
```

Или же так:

```
SELECT 
    DISTINCT P.id, 
    P.name, 
    P.catalog_id,
    P.brand_id 
FROM products P 
WHERE 
    P.catalog_id = 5287 AND P.brand_id = 15837;
```

То получаю ошибки

```
SQL Error [10]: ClickHouse exception, code: 10, Code: 10, e.displayText() = DB::Exception: Not found column equals(catalog_id, 5287) in block: while executing 'INPUT : 1 -> equals(catalog_id, 5287) UInt8 : 1' (version 21.3.4.25 (official build))
```

```
SQL Error [10]: ClickHouse exception, code: 10, Code: 10, e.displayText() = DB::Exception: Not found column equals(brand_id, 15837) in block: while executing 'INPUT : 0 -> equals(brand_id, 15837) UInt8 : 0' (version 21.3.4.25 (official build))
```

Почему так происходит? как выйти из этой ситуации?

Структура
```
CREATE TABLE analyzer.products
(

    `id` Int32,

    `product_id` Int32,

    `catalog_id` Int32,

    `brand_id` Int32,

    `name` Nullable(String),

    `description` Nullable(String),

    `supplier` Nullable(String),

    `marketplace` String,

    `letter` String,

    `isNew` UInt8,

    `isSoldOut` UInt8,

    `created` DateTime,

    `updated` DateTime,

    `_sign` Int8 MATERIALIZED 1,

    `_version` UInt64 MATERIALIZED 1
)
ENGINE = ReplacingMergeTree(_version)
PARTITION BY intDiv(id,
 4294967)
ORDER BY (product_id,
 catalog_id,
 brand_id,
 letter,
 updated,
 id)
SETTINGS index_granularity = 8192
```
{
    if (!ast || !ast->as<ASTLiteral>())
        throw Exception("Database engine " + engine_name + " requested literal argument.", ErrorCodes::BAD_ARGUMENTS);
    return ast->as<ASTLiteral>()->value.safeGet<ValueType>();
}
DatabasePtr DatabaseFactory::getImpl(const ASTCreateQuery & create, const String & metadata_path, ContextPtr context)
{
    auto * engine_define = create.storage;
    const String & database_name = create.database;
    const String & engine_name = engine_define->engine->name;
    const UUID & uuid = create.uuid;
    bool engine_may_have_arguments = engine_name == "MySQL" || engine_name == "MaterializeMySQL" || engine_name == "Lazy" ||
                                     engine_name == "Replicated" || engine_name == "PostgreSQL";
    if (engine_define->engine->arguments && !engine_may_have_arguments)
        throw Exception("Database engine " + engine_name + " cannot have arguments", ErrorCodes::BAD_ARGUMENTS);
    bool has_unexpected_element = engine_define->engine->parameters || engine_define->partition_by ||
                                  engine_define->primary_key || engine_define->order_by ||
                                  engine_define->sample_by;
    bool may_have_settings = endsWith(engine_name, "MySQL") || engine_name == "Replicated";
    if (has_unexpected_element || (!may_have_settings && engine_define->settings))
        throw Exception("Database engine " + engine_name + " cannot have parameters, primary_key, order_by, sample_by, settings",
                        ErrorCodes::UNKNOWN_ELEMENT_IN_AST);
    if (engine_name == "Ordinary")
        return std::make_shared<DatabaseOrdinary>(database_name, metadata_path, context);
    else if (engine_name == "Atomic")