mirror of https://gitee.com/bigwinds/arangodb
sorting
This commit is contained in:
parent
7ba6b17d45
commit
04b322d9e0
|
@ -829,7 +829,9 @@ std::string AstNode::stringify () const {
|
||||||
case NODE_TYPE_REFERENCE: {
|
case NODE_TYPE_REFERENCE: {
|
||||||
auto variable = static_cast<Variable*>(getData());
|
auto variable = static_cast<Variable*>(getData());
|
||||||
TRI_ASSERT(variable != nullptr);
|
TRI_ASSERT(variable != nullptr);
|
||||||
return variable->name;
|
// we're intentionally not using the variable name as it is not necessarily
|
||||||
|
// unique within a query (hey COLLECT, I am looking at you!)
|
||||||
|
return std::to_string(variable->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
default: {
|
default: {
|
||||||
|
|
|
@ -951,7 +951,9 @@ SortInformation SortNode::getSortInformation (ExecutionPlan* plan) const {
|
||||||
result.criteria.emplace_back(std::make_tuple(setter, expression->stringify(), (*it).second));
|
result.criteria.emplace_back(std::make_tuple(setter, expression->stringify(), (*it).second));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
result.criteria.emplace_back(std::make_tuple(setter, variable->name, (*it).second));
|
// use variable only. note that we cannot use the variable's name as it is not
|
||||||
|
// necessarily unique in one query (yes, COLLECT, you are to blame!)
|
||||||
|
result.criteria.emplace_back(std::make_tuple(setter, std::to_string(variable->id), (*it).second));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue