Имеется 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
```
const std::string & server_,
         const std::string & user_ = "",
         const std::string & password_ = "",
         unsigned port_ = 0,
         const std::string & socket_ = "",
         unsigned connect_timeout_ = MYSQLXX_DEFAULT_TIMEOUT,
         unsigned rw_timeout_ = MYSQLXX_DEFAULT_RW_TIMEOUT,
         unsigned default_connections_ = MYSQLXX_POOL_DEFAULT_START_CONNECTIONS,
         unsigned max_connections_ = MYSQLXX_POOL_DEFAULT_MAX_CONNECTIONS,
         unsigned enable_local_infile_ = MYSQLXX_DEFAULT_ENABLE_LOCAL_INFILE,
         bool opt_reconnect_ = MYSQLXX_DEFAULT_MYSQL_OPT_RECONNECT)
    : logger(Poco::Logger::get("mysqlxx::Pool")), default_connections(default_connections_),
    max_connections(max_connections_), db(db_), server(server_), user(user_), password(password_), port(port_), socket(socket_),
    connect_timeout(connect_timeout_), rw_timeout(rw_timeout_), enable_local_infile(enable_local_infile_),
    opt_reconnect(opt_reconnect_) {}
    Pool(const Pool & other)
        : logger(other.logger), default_connections{other.default_connections},
          max_connections{other.max_connections},
          db{other.db}, server{other.server},
          user{other.user}, password{other.password},
          port{other.port}, socket{other.socket},
          connect_timeout{other.connect_timeout}, rw_timeout{other.rw_timeout},
          enable_local_infile{other.enable_local_infile}, opt_reconnect(other.opt_reconnect)
    {}
    Pool & operator=(const Pool &) = delete;