mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
dbms: prefer static version of boost_regex, add support for loading specific ids with MongoDBDictionarySource [#METR-17854]
This commit is contained in:
parent
a36436a64b
commit
1657e38c97
@ -97,9 +97,12 @@ public:
|
||||
|
||||
BlockInputStreamPtr loadIds(const std::vector<std::uint64_t> & ids) override
|
||||
{
|
||||
/// @todo: convert ids to a BSONObj with $in and enumeration, pass as second argument to .query
|
||||
/// mongo::BSONObj has shitty design and does not use fixed width integral types
|
||||
const std::vector<long long int> iids{std::begin(ids), std::end(ids)};
|
||||
const auto ids_enumeration = BSON(dict_struct.id.name << BSON("$in" << iids));
|
||||
|
||||
return new MongoDBBlockInputStream{
|
||||
connection.query(db + '.' + collection, {}, 0, 0, &fields_to_query),
|
||||
connection.query(db + '.' + collection, ids_enumeration, 0, 0, &fields_to_query),
|
||||
sample_block, 8192
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user