1
0
Fork 0
This commit is contained in:
Jan Steemann 2014-08-28 14:04:24 +02:00
parent 7ba6b17d45
commit 04b322d9e0
2 changed files with 6 additions and 2 deletions

View File

@ -829,7 +829,9 @@ std::string AstNode::stringify () const {
case NODE_TYPE_REFERENCE: {
auto variable = static_cast<Variable*>(getData());
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: {

View File

@ -951,7 +951,9 @@ SortInformation SortNode::getSortInformation (ExecutionPlan* plan) const {
result.criteria.emplace_back(std::make_tuple(setter, expression->stringify(), (*it).second));
}
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));
}
}