Merge branch 'T1083-MG-limit-and-order-expand-one_v3' of github.com:memgraph/memgraph into T1083-MG-limit-and-order-expand-one_v3

This commit is contained in:
jeremy 2022-11-17 12:59:37 +01:00
commit d482f7da90
2 changed files with 4 additions and 4 deletions

View File

@ -117,11 +117,11 @@ struct Element {
TObjectAccessor object_acc;
};
template <typename TIterable>
template <typename T>
concept IDontKnowAGoodNameForThis = utils::SameAsAnyOf<T, VerticesIterable, std::vector<VertexAccessor>>
template <IDontKnowAGoodNameForThis TIterable>
std::vector<Element<VertexAccessor>> OrderByVertices(Shard::Accessor &acc, DbAccessor &dba, TIterable &iterable,
std::vector<msgs::OrderBy> &order_bys) {
static_assert(std::is_same_v<TIterable, VerticesIterable> || std::is_same_v<TIterable, std::vector<VertexAccessor>>);
std::vector<Ordering> ordering;
ordering.reserve(order_bys.size());
std::transform(order_bys.begin(), order_bys.end(), std::back_inserter(ordering), [](const auto &order_by) {

View File

@ -563,7 +563,7 @@ msgs::ReadResponses ShardRsm::HandleRead(msgs::ExpandOneRequest &&req) {
break;
}
results.emplace_back(maybe_result.value());
results.emplace_back(std::move(maybe_result.value()));
if (batch_limit.has_value() && results.size() >= batch_limit.value()) {
break;
}