-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
According to the query language reference, it's possible to have a default value for the ordering, if the field it is ordered on isn't defined.
Here's an example:
drop target/tests/querytestorder;
create target/tests/querytestorder;
add {"_id":"9", "bar": true};
"9"
add {"_id":"10", "bar": false};
"10"
add {"_id":"15", "foo":"coll", "bar": "string"};
"15"
add {"_id":"18"};
"18"
# This one is OK
find {}
order .bar asc
return .bar;
[
null,
false,
true,
"string"
]
# This one is also OK
find {}
order .bar default=1 asc
return .bar default=1;
[
false,
true,
1,
"string"
]
# This one fails. It returns `null` as first element.
# If it would take the `default=1` into account,
# it would have the order shown below.
find {}
order .bar default=1 asc
return .bar;
[
false,
true,
null,
"string"
]
Metadata
Metadata
Assignees
Labels
No labels