1
0
Fork 0

yet another micro-optimization (#10383)

This commit is contained in:
Jan 2019-11-08 16:09:52 +01:00 committed by GitHub
parent 04cf6b2c41
commit 62e39e80b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -2656,7 +2656,8 @@ AstNode* Ast::makeConditionFromExample(AstNode const* node) {
}
AstNode* result = nullptr;
std::vector<std::pair<char const*, size_t>> attributeParts{};
::arangodb::containers::SmallVector<arangodb::velocypack::StringRef>::allocator_type::arena_type a;
::arangodb::containers::SmallVector<arangodb::velocypack::StringRef> attributeParts{a};
std::function<void(AstNode const*)> createCondition = [&](AstNode const* object) -> void {
TRI_ASSERT(object->type == NODE_TYPE_OBJECT);
@ -2672,8 +2673,7 @@ AstNode* Ast::makeConditionFromExample(AstNode const* node) {
"expecting object literal with literal attribute names in example");
}
attributeParts.emplace_back(
std::make_pair(member->getStringValue(), member->getStringLength()));
attributeParts.emplace_back(member->getStringRef());
auto value = member->getMember(0);
@ -2682,7 +2682,7 @@ AstNode* Ast::makeConditionFromExample(AstNode const* node) {
} else {
auto access = variable;
for (auto const& it : attributeParts) {
access = createNodeAttributeAccess(access, it.first, it.second);
access = createNodeAttributeAccess(access, it.data(), it.size());
}
auto condition =

View File

@ -405,7 +405,7 @@ function ahuacatlSubqueryTestSuite () {
}
col.save(docs);
// Now we do a left out join on the same collection
// Now we do a left outer join on the same collection
const query = `
FOR left IN ${colName}
LET rightJoin = (