17
17
#include " Firestore/core/src/remote/remote_objc_bridge.h"
18
18
19
19
#include < map>
20
+ #include < unordered_map>
20
21
21
22
#include " Firestore/core/src/core/database_info.h"
22
23
#include " Firestore/core/src/core/query.h"
@@ -272,11 +273,13 @@ DatastoreSerializer::MergeLookupResponses(
272
273
return result;
273
274
}
274
275
276
+ // TODO(b/443765747) Revert back to absl::flat_hash_map after the absl version
277
+ // is upgraded to later than 20250127.0
275
278
Message<google_firestore_v1_RunAggregationQueryRequest>
276
279
DatastoreSerializer::EncodeAggregateQueryRequest (
277
280
const core::Query& query,
278
281
const std::vector<AggregateField>& aggregates,
279
- absl::flat_hash_map <std::string, std::string>& aliasMap) const {
282
+ std::unordered_map <std::string, std::string>& aliasMap) const {
280
283
Message<google_firestore_v1_RunAggregationQueryRequest> result;
281
284
auto encodedTarget = serializer_.EncodeQueryTarget (query.ToAggregateTarget ());
282
285
result->parent = encodedTarget.parent ;
@@ -291,7 +294,9 @@ DatastoreSerializer::EncodeAggregateQueryRequest(
291
294
// De-duplicate aggregates based on the alias.
292
295
// Since aliases are auto-computed from the operation and path,
293
296
// equal aggregate will have the same alias.
294
- absl::flat_hash_map<std::string, AggregateField> uniqueAggregates;
297
+ // TODO(b/443765747) Revert back to absl::flat_hash_map after the absl version
298
+ // is upgraded to later than 20250127.0
299
+ std::unordered_map<std::string, AggregateField> uniqueAggregates;
295
300
for (const AggregateField& aggregate : aggregates) {
296
301
auto pair = std::pair<std::string, AggregateField>(
297
302
aggregate.alias .StringValue (), aggregate);
@@ -365,9 +370,11 @@ DatastoreSerializer::EncodeAggregateQueryRequest(
365
370
return result;
366
371
}
367
372
373
+ // TODO(b/443765747) Revert back to absl::flat_hash_map after the absl version
374
+ // is upgraded to later than 20250127.0
368
375
util::StatusOr<ObjectValue> DatastoreSerializer::DecodeAggregateQueryResponse (
369
376
const grpc::ByteBuffer& response,
370
- const absl::flat_hash_map <std::string, std::string>& aliasMap) const {
377
+ const std::unordered_map <std::string, std::string>& aliasMap) const {
371
378
ByteBufferReader reader{response};
372
379
auto message =
373
380
Message<google_firestore_v1_RunAggregationQueryResponse>::TryParse (
0 commit comments