`DROP TABLE if exists default.test_20221226 on cluster clickhouse;
CREATE TABLE default.test_20221226 on cluster clickhouse
(
   uid Int64,
   start Int64,
   end Int64,
   ck_insert_time DateTime default now()
)
ENGINE = ReplacingMergeTree(ck_insert_time)
ORDER BY (uid, start)
;

DROP TABLE if exists default.test_20221226_all on cluster clickhouse;
CREATE TABLE default.test_20221226_all on cluster clickhouse AS default.test_20221226
ENGINE = Distributed('clickhouse', 'default', 'test_20221226', cityHash64(uid))
;

DROP DICTIONARY if exists default.test_20221226_dict on cluster clickhouse;
CREATE DICTIONARY default.test_20221226_dict on cluster clickhouse
(
    uid Int64,
    start Int64,
    end Int64,
    ck_insert_time DateTime
)
PRIMARY KEY uid
SOURCE(CLICKHOUSE(HOST 'localhost' PORT 9000 USER 'default' PASSWORD 'default' DB 'default' TABLE 'test_20221226_all' UPDATE_FIELD 'ck_insert_time' UPDATE_LAG 60))
LIFETIME(MIN 10 MAX 60)
LAYOUT(RANGE_HASHED())
RANGE(MIN start MAX end)
;

INSERT INTO default.test_20221226_all(uid,start,end) values (1, 0, 100),(1, 101,200),(2,0,999),(2,1000,10000);

select * from default.test_20221226_all ;
uid	start	end	ck_insert_time
1	0	100	2022-12-26 11:38:34
1	101	200	2022-12-26 11:38:34
2	0	999	2022-12-26 11:38:34
2	1000	10000	2022-12-26 11:38:34

select * from default.test_20221226_dict ;
uid	start	end	ck_insert_time
1	0	100	2022-12-26 11:38:34
1	101	200	2022-12-26 11:38:34
2	0	999	2022-12-26 11:38:34
2	1000	10000	2022-12-26 11:38:34

`

after the DICTIONARY update. (one minute later)

`
select * from default.test_20221226_all ;
uid	start	end	ck_insert_time
1	0	100	2022-12-26 11:38:34
1	101	200	2022-12-26 11:38:34
2	0	999	2022-12-26 11:38:34
2	1000	10000	2022-12-26 11:38:34

select * from default.test_20221226_dict ;
uid	start	end	ck_insert_time
1	101	200	2022-12-26 11:38:34
2	1000	10000	2022-12-26 11:38:34

`

the result in dict is wrong, missing the first range for each PRIMARY KEY.

somthing wrong in my create sql? or a bug for this version. because i have used this plan in version 21.11.4.14, that's greats on it,



key_to_index_column_data.emplace_back(invalid_interval_with_key.attribute_value_index);
            range_min_column_data.push_back(invalid_interval_with_key.interval.left);
            range_max_column_data.push_back(invalid_interval_with_key.interval.right);
        }
    });
    auto range_min_column_with_type = ColumnWithTypeAndName{std::move(range_min_column), dict_struct.range_min->type, dict_struct.range_min->name};
    auto range_max_column_with_type = ColumnWithTypeAndName{std::move(range_max_column), dict_struct.range_max->type, dict_struct.range_max->name};
    ColumnsWithTypeAndName key_columns;
    if constexpr (dictionary_key_type == DictionaryKeyType::Simple)
    {
        auto keys_column = getColumnFromPODArray(std::move(keys));
        key_columns = {ColumnWithTypeAndName(std::move(keys_column), std::make_shared<DataTypeUInt64>(), dict_struct.id->name)};
    }
    else
    {
        key_columns = deserializeColumnsWithTypeAndNameFromKeys(dict_struct, keys, 0, keys.size());
    }
    key_columns.emplace_back(ColumnWithTypeAndName{std::move(key_to_index_column), std::make_shared<DataTypeUInt64>(), ""});
    ColumnsWithTypeAndName data_columns = {std::move(range_min_column_with_type), std::move(range_max_column_with_type)};
    std::shared_ptr<const IDictionary> dictionary = shared_from_this();
    DictionarySourceCoordinator::ReadColumnsFunc read_keys_func = [dictionary_copy = dictionary](
        const Strings & attribute_names,
        const DataTypes & result_types,
        const Columns & key_columns,
        const DataTypes,
        const Columns &)
    {
        auto range_dictionary_ptr = std::static_pointer_cast<const RangeHashedDictionary<dictionary_key_type>>(dictionary_copy);
        size_t attribute_names_size = attribute_names.size();
        Columns result;