**Describe the unexpected behaviour**
It's not possible to calculate min and max values for range dictionary via EXPRESSION

**How to reproduce**
ClickHouse version 21.11

```
CREATE TABLE test_range_dict
(
    `id` UInt32,
    `date` Date,
    `start` Date,
    `end` Date
)
ENGINE = Memory

CREATE DICTIONARY IF NOT EXISTS test_range_dict_d
(
    `id` UInt64,
    `date` Date,
    `start` Date,
    `end` Date,
    `start_date` Date EXPRESSION date - toIntervalDay(1),
    `end_date` Date EXPRESSION any(date) OVER (PARTITION BY id ORDER BY date ASC Rows BETWEEN 1 PRECEDING AND 1 PRECEDING)
)
PRIMARY KEY id
SOURCE(CLICKHOUSE(TABLE 'test_range_dict'))
LIFETIME(MIN 0 MAX 120)
LAYOUT(RANGE_HASHED())
RANGE(MIN start MAX end)

Ok.

0 rows in set. Elapsed: 0.006 sec.


SELECT *
FROM test_range_dict_d

Ok.

0 rows in set. Elapsed: 0.011 sec.


DROP DICTIONARY  test_range_dict_d;

CREATE DICTIONARY IF NOT EXISTS test_range_dict_d
(
    `id` UInt64,
    `date` Date,
    `start` Date,
    `end` Date,
    `start_date` Date EXPRESSION date - toIntervalDay(1),
    `end_date` Date EXPRESSION any(date) OVER (PARTITION BY id ORDER BY date ASC Rows BETWEEN 1 PRECEDING AND 1 PRECEDING)
)
PRIMARY KEY id
SOURCE(CLICKHOUSE(TABLE 'test_range_dict'))
LIFETIME(MIN 0 MAX 120)
LAYOUT(RANGE_HASHED())
RANGE(MIN start_date MAX end_date)


Ok.

0 rows in set. Elapsed: 0.008 sec.


SELECT *
FROM test_range_dict_d


0 rows in set. Elapsed: 0.002 sec.

Received exception from server (version 21.11.1):
Code: 47. DB::Exception: Received from localhost:9000. DB::Exception: Missing columns: 'end_date' 'start_date' while processing query: 'SELECT id, start_date, end_date, date, start, end FROM default.test_range_dict', required columns: 'start_date' 'id' 'end' 'end_date' 'start' 'date', maybe you meant: ['id','end','start','date']. (UNKNOWN_IDENTIFIER)
```

**Expected behavior**
Dictionary works

AutoPtr<Poco::XML::Element> uuid_element(xml_document->createElement("uuid"));
        current_dictionary->appendChild(uuid_element);
        AutoPtr<Text> uuid(xml_document->createTextNode(toString(query.uuid)));
        uuid_element->appendChild(uuid);
    }
    AutoPtr<Element> structure_element(xml_document->createElement("structure"));
    current_dictionary->appendChild(structure_element);
    Names pk_attrs = getPrimaryKeyColumns(query.dictionary->primary_key);
    auto * dictionary_layout = query.dictionary->layout;
    bool complex = DictionaryFactory::instance().isComplex(dictionary_layout->layout_type);
    auto all_attr_names_and_types = buildDictionaryAttributesConfiguration(
        xml_document, structure_element, query.dictionary_attributes_list, pk_attrs);
    checkPrimaryKey(all_attr_names_and_types, pk_attrs);
    buildPrimaryKeyConfiguration(xml_document, structure_element, complex, pk_attrs, query.dictionary_attributes_list);
    buildLayoutConfiguration(xml_document, current_dictionary, dictionary_layout);
    buildSourceConfiguration(xml_document, current_dictionary, query.dictionary->source, query.dictionary->dict_settings, context);
    buildLifetimeConfiguration(xml_document, current_dictionary, query.dictionary->lifetime);
    if (query.dictionary->range)
        buildRangeConfiguration(xml_document, structure_element, query.dictionary->range, all_attr_names_and_types);
    if (query.comment)
    {
        AutoPtr<Element> comment_element(xml_document->createElement("comment"));
        current_dictionary->appendChild(comment_element);
        AutoPtr<Text> comment_value(xml_document->createTextNode(query.comment->as<ASTLiteral>()->value.safeGet<String>()));
        comment_element->appendChild(comment_value);
    }
    conf->load(xml_document);
    return conf;
}
std::optional<ClickHouseDictionarySourceInfo>