mirror of https://gitee.com/bigwinds/arangodb
yet another micro-optimization (#10383)
This commit is contained in:
parent
04cf6b2c41
commit
62e39e80b3
|
@ -2656,7 +2656,8 @@ AstNode* Ast::makeConditionFromExample(AstNode const* node) {
|
||||||
}
|
}
|
||||||
|
|
||||||
AstNode* result = nullptr;
|
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 {
|
std::function<void(AstNode const*)> createCondition = [&](AstNode const* object) -> void {
|
||||||
TRI_ASSERT(object->type == NODE_TYPE_OBJECT);
|
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");
|
"expecting object literal with literal attribute names in example");
|
||||||
}
|
}
|
||||||
|
|
||||||
attributeParts.emplace_back(
|
attributeParts.emplace_back(member->getStringRef());
|
||||||
std::make_pair(member->getStringValue(), member->getStringLength()));
|
|
||||||
|
|
||||||
auto value = member->getMember(0);
|
auto value = member->getMember(0);
|
||||||
|
|
||||||
|
@ -2682,7 +2682,7 @@ AstNode* Ast::makeConditionFromExample(AstNode const* node) {
|
||||||
} else {
|
} else {
|
||||||
auto access = variable;
|
auto access = variable;
|
||||||
for (auto const& it : attributeParts) {
|
for (auto const& it : attributeParts) {
|
||||||
access = createNodeAttributeAccess(access, it.first, it.second);
|
access = createNodeAttributeAccess(access, it.data(), it.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
auto condition =
|
auto condition =
|
||||||
|
|
|
@ -405,7 +405,7 @@ function ahuacatlSubqueryTestSuite () {
|
||||||
}
|
}
|
||||||
col.save(docs);
|
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 = `
|
const query = `
|
||||||
FOR left IN ${colName}
|
FOR left IN ${colName}
|
||||||
LET rightJoin = (
|
LET rightJoin = (
|
||||||
|
|
Loading…
Reference in New Issue